aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc-ar.c
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2013-06-19 21:01:06 +0000
committerMatthias Klose <doko@gcc.gnu.org>2013-06-19 21:01:06 +0000
commita09f1a766b297f1e248c86b3d2795c1501a506ef (patch)
tree8f4628b585dfd1bbf58b2333cd36b27d3654d463 /gcc/gcc-ar.c
parent7d18b0ad768f4b8e4126cda2ce0a3f1f5a0ddd29 (diff)
downloadgcc-a09f1a766b297f1e248c86b3d2795c1501a506ef.zip
gcc-a09f1a766b297f1e248c86b3d2795c1501a506ef.tar.gz
gcc-a09f1a766b297f1e248c86b3d2795c1501a506ef.tar.bz2
re PR driver/57651 (gcc-ar and gcc-nm don't find the lto plugin)
2013-06-19 Matthias Klose <doko@ubuntu.com> PR driver/57651 * file-find.h (find_a_file): Add a mode parameter. * file-find.c (find_a_file): Likewise. * gcc-ar.c (main): Call find_a_file with R_OK for the plugin, with X_OK for the executables. * collect2.c (main): Call find_a_file with X_OK. From-SVN: r200219
Diffstat (limited to 'gcc/gcc-ar.c')
-rw-r--r--gcc/gcc-ar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/gcc-ar.c b/gcc/gcc-ar.c
index e3ad54b..ef425c1 100644
--- a/gcc/gcc-ar.c
+++ b/gcc/gcc-ar.c
@@ -136,7 +136,7 @@ main(int ac, char **av)
setup_prefixes (av[0]);
/* Find the GCC LTO plugin */
- plugin = find_a_file (&target_path, LTOPLUGINSONAME);
+ plugin = find_a_file (&target_path, LTOPLUGINSONAME, R_OK);
if (!plugin)
{
fprintf (stderr, "%s: Cannot find plugin '%s'\n", av[0], LTOPLUGINSONAME);
@@ -144,14 +144,14 @@ main(int ac, char **av)
}
/* Find the wrapped binutils program. */
- exe_name = find_a_file (&target_path, PERSONALITY);
+ exe_name = find_a_file (&target_path, PERSONALITY, X_OK);
if (!exe_name)
{
const char *real_exe_name = PERSONALITY;
#ifdef CROSS_DIRECTORY_STRUCTURE
real_exe_name = concat (target_machine, "-", PERSONALITY, NULL);
#endif
- exe_name = find_a_file (&path, real_exe_name);
+ exe_name = find_a_file (&path, real_exe_name, X_OK);
if (!exe_name)
{
fprintf (stderr, "%s: Cannot find binary '%s'\n", av[0],