diff options
author | espindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 17:24:37 +0000 |
---|---|---|
committer | espindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 17:24:37 +0000 |
commit | 06b9e52b8e4c071a2846fdf9931e48b640230cff (patch) | |
tree | bbdb30714a65a45ea093d3c41499626e8893a5bb /gcc/gcc.c | |
parent | 185253437a38fdb2cb66eb5f3c82885dff7bf9b7 (diff) | |
download | gcc-06b9e52b8e4c071a2846fdf9931e48b640230cff.tar.gz |
2009-11-04 Richard Guenther <rguenther@suse.de>
Rafael Avila de Espindola <espindola@google.com>
* gcc.c (process_command): Handle arguments name@offset.
2009-11-04 Richard Guenther <rguenther@suse.de>
Rafael Avila de Espindola <espindola@google.com>
* lto-elf.c (lto_elf_build_section_table): Add the base offset.
(lto_elf_file_open): Handle offsets in arguments name@offest.
2009-11-04 Richard Guenther <rguenther@suse.de>
Rafael Avila de Espindola <espindola@google.com>
* lto-plugin.c (plugin_file_info): Remove temp field.
(cleanup_handler): Don't delete temporary objects.
(claim_file_handler): Don't create temporary objects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 0f74dd07970..6bc8e150a67 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4568,20 +4568,32 @@ process_command (int argc, const char **argv) } else { + const char *p = strchr (argv[i], '@'); + char *fname; #ifdef HAVE_TARGET_OBJECT_SUFFIX argv[i] = convert_filename (argv[i], 0, access (argv[i], F_OK)); #endif + if (!p) + fname = xstrdup (argv[i]); + else + { + fname = (char *)xmalloc (p - argv[i] + 1); + memcpy (fname, argv[i], p - argv[i]); + fname[p - argv[i]] = '\0'; + } + + if (strcmp (fname, "-") != 0 && access (fname, F_OK) < 0) + { + perror_with_name (fname); + error_count++; + } + else + { + infiles[n_infiles].language = spec_lang; + infiles[n_infiles++].name = argv[i]; + } - if (strcmp (argv[i], "-") != 0 && access (argv[i], F_OK) < 0) - { - perror_with_name (argv[i]); - error_count++; - } - else - { - infiles[n_infiles].language = spec_lang; - infiles[n_infiles++].name = argv[i]; - } + free (fname); } } |