http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51720
Ramón García <ramon.garcia.freesw at gmx dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | --- Comment #2 from Ramón García <ramon.garcia.freesw at gmx dot com> 2011-12-30 23:05:23 UTC --- The option --with-stage1-ldflags is a documented option of the GCC build process that is not being processed correctly. From the installation instructions (install/configure.html from the source tree): --with-stage-1dflags=flags This option may be used to set linker flags to be used when linking stage 1 of GCC. These are also used when linking GCC if configured with --disable-bootstrap. By default no special flags are used. There are other reasons for using this build option, perhaps compiling with some vendor linker or operating system needs it. In fact, the option is processed, but incorrectly, as I explained. The generated Makefile contains STAGE1_LDFLAGS = -Wl,-rpath=/opt/gcc-4.6/lib -static-libgcc -static-libstdc++ and the speficication for the target all-gcc-stage1: .... $(HOST_EXPORTS) ... The variable HOST_EXPORTS passes settings such as LDFLAGS=$(STAGE1_LDFLAGS) to the stage1. But the make invocation contains a command line settings that takes higher priority. In summary, this is a case of a documented option that is not being correctly handled.