summaryrefslogtreecommitdiff
path: root/gcc/gcc-ar.c
diff options
context:
space:
mode:
authordoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-19 21:01:06 +0000
committerdoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-19 21:01:06 +0000
commit0dc1ebca5751c076a9ea07a7e6d6e8428bdbe73b (patch)
tree8f4628b585dfd1bbf58b2333cd36b27d3654d463 /gcc/gcc-ar.c
parentb6c75192521f22b4adc19304469c351cd2620012 (diff)
downloadgcc-0dc1ebca5751c076a9ea07a7e6d6e8428bdbe73b.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200219 138bc75d-0d04-0410-961f-82ee72b054a4
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 e3ad54b327e..ef425c1cb30 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],