aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc-ar.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-06-19 19:37:36 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-06-19 19:37:36 +0200
commit216c12abf6eccbcf5c5ff1898e8b063a494af40c (patch)
tree3f763b63f3d29613f9d658ae471c1b4aeb4532bc /gcc/gcc-ar.c
parentecdbf306757a1c18e29a2920470438453dafe8f8 (diff)
downloadgcc-216c12abf6eccbcf5c5ff1898e8b063a494af40c.zip
gcc-216c12abf6eccbcf5c5ff1898e8b063a494af40c.tar.gz
gcc-216c12abf6eccbcf5c5ff1898e8b063a494af40c.tar.bz2
re PR driver/57651 (gcc-ar and gcc-nm don't find the lto plugin)
PR driver/57651 * gcc-ar.c (main): If not CROSS_DIRECTORY_STRUCTURE, look for PERSONALITY in $PATH derived prefixes. From-SVN: r200209
Diffstat (limited to 'gcc/gcc-ar.c')
-rw-r--r--gcc/gcc-ar.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/gcc-ar.c b/gcc/gcc-ar.c
index bb6ed9f..e3ad54b 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 */