diff options
author | synergydev <synergye@codefi.re> | 2013-10-17 18:16:42 -0700 |
---|---|---|
committer | synergydev <synergye@codefi.re> | 2013-10-17 18:16:42 -0700 |
commit | 61c0330cc243abf13fdd01f377a7f80bd3989eb1 (patch) | |
tree | 119b08ae76294f23e2b1b7e72ff9a06afa9e8509 /gcc-4.8/gcc/gcc-ar.c | |
parent | 1c712bf7621f3859c33fd3afaa61fdcaf3fdfd76 (diff) | |
download | toolchain_gcc-61c0330cc243abf13fdd01f377a7f80bd3989eb1.tar.gz toolchain_gcc-61c0330cc243abf13fdd01f377a7f80bd3989eb1.tar.bz2 toolchain_gcc-61c0330cc243abf13fdd01f377a7f80bd3989eb1.zip |
[4.8] Merge GCC 4.8.2
Change-Id: I0f1fcf69c5076d8534c5c45562745e1a37adb197
Diffstat (limited to 'gcc-4.8/gcc/gcc-ar.c')
-rw-r--r-- | gcc-4.8/gcc/gcc-ar.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc-4.8/gcc/gcc-ar.c b/gcc-4.8/gcc/gcc-ar.c index bb6ed9fb7..ef425c1cb 100644 --- a/gcc-4.8/gcc/gcc-ar.c +++ b/gcc-4.8/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,24 +144,20 @@ 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 - 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, X_OK); 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 */ |