diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-19 17:37:36 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-19 17:37:36 +0000 |
commit | a90c63ff18562cb1fd4da12b68d74d9f5592f414 (patch) | |
tree | 3f763b63f3d29613f9d658ae471c1b4aeb4532bc | |
parent | 040f64e59a4633940408b2e0aece73296a06e78b (diff) | |
download | gcc-a90c63ff18562cb1fd4da12b68d74d9f5592f414.tar.gz |
PR driver/57651
* gcc-ar.c (main): If not CROSS_DIRECTORY_STRUCTURE, look for
PERSONALITY in $PATH derived prefixes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200209 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gcc-ar.c | 14 |
2 files changed, 11 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd60452a5c7..8b6bc6f964b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-06-19 Jakub Jelinek <jakub@redhat.com> + + PR driver/57651 + * gcc-ar.c (main): If not CROSS_DIRECTORY_STRUCTURE, look for + PERSONALITY in $PATH derived prefixes. + 2013-06-19 Jeff Law <law@redhat.com> * tree-ssa-forwprop.c (simplify_bitwise_binary_boolean): Fix typo diff --git a/gcc/gcc-ar.c b/gcc/gcc-ar.c index bb6ed9fb78e..e3ad54b327e 100644 --- a/gcc/gcc-ar.c +++ b/gcc/gcc-ar.c @@ -147,21 +147,17 @@ main(int ac, char **av) exe_name = find_a_file (&target_path, PERSONALITY); if (!exe_name) { + const char *real_exe_name = PERSONALITY; #ifdef CROSS_DIRECTORY_STRUCTURE - const char *cross_exe_name; - - cross_exe_name = concat (target_machine, "-", PERSONALITY, NULL); - exe_name = find_a_file (&path, cross_exe_name); + real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); +#endif + exe_name = find_a_file (&path, real_exe_name); if (!exe_name) { fprintf (stderr, "%s: Cannot find binary '%s'\n", av[0], - cross_exe_name); + real_exe_name); exit (1); } -#else - fprintf (stderr, "%s: Cannot find binary '%s'\n", av[0], PERSONALITY); - exit (1); -#endif } /* Create new command line with plugin */ |