On Mon, Dec 9, 2013 at 4:48 AM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Mon, Dec 2, 2013 at 4:49 AM, H.J. Lu <hjl.to...@gmail.com> wrote: >> Hi, >> >> "ld" is a special name for GCC driver. find_a_file has >> >> #ifdef DEFAULT_LINKER >> if (! strcmp (name, "ld") && access (DEFAULT_LINKER, mode) == 0) >> return xstrdup (DEFAULT_LINKER); >> #endif >> #endif >> >> It does 2 things: >> >> 1. Print DEFAULT_LINKER for -print-prog-name=ld. >> 2. Run DEFAULT_LINKER when ld is needed to run. >> >> But gcc.c fails to check -print-prog-name=ld with -fuse-ld= and >> collect2.c fails to properly handle -fuse-ld= when DEFAULT_LINKER >> is defined. This patches fixes those 2 problems: >> >> 1. Check "ld" + suffix specicied by -fuse-ld= for -print-prog-name=ld. >> 2. Try DEFAULT_LINKER + suffix specicied by -fuse-ld=. >> >> This patch also tries to handle HOST_EXECUTABLE_SUFFIX. Tested on >> Linux/x86. OK to install? >> >> Thanks. >> >> >> H.J. >> --- >> 2013-11-30 H.J. Lu <hongjiu...@intel.com> >> >> PR driver/59321 >> * collect2.c (main): Check -fuse-ld=[bfd|gold] when >> DEFAULT_LINKER is defined. >> * gcc.c (use_ld): New variable. >> (process_command): Set use_ld for OPT_fuse_ld_bfd and >> OPT_fuse_ld_gold. >> (main): Check -fuse-ld=[bfd|gold] for -print-prog-name=ld. >> > > Hi Joseph, > > Can you take a look at it? >
Ping. The patch is at http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00061.html Thanks -- H.J.