This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/51720] Build issue. stage1 ldflags not correctly used
- From: "ramon.garcia.freesw at gmx dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Dec 2011 23:05:23 +0000
- Subject: [Bug other/51720] Build issue. stage1 ldflags not correctly used
- Auto-submitted: auto-generated
- References: <bug-51720-4@http.gcc.gnu.org/bugzilla/>
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.