This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: LDFLAGS handling in V3
- From: Daniel Jacobowitz <drow at false dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, aoliva at redhat dot com
- Date: Wed, 27 Jul 2005 17:53:46 -0400
- Subject: Re: PATCH: LDFLAGS handling in V3
- References: <200507272135.j6RLZHH2024117@sethra.codesourcery.com>
On Wed, Jul 27, 2005 at 02:35:17PM -0700, Mark Mitchell wrote:
> However, since the linker is actually libtool, rather than the
> ordinary linker, I think that the LDFLAGS should be prefixed with
> "-Wl,". Otherwise, libtool will disregard some, but not all, of the
> flags provided, and will invoke the linker (well, "xgcc") without all
> of the options. (An example of an option which libtool will ignore is
> "--sysroot".) I guess that libtool could be made to recognize more
> options and know that they are for the linker, as well as the
> compiler, but it seems better just to bullet-proof the Makefiles. You
> could also argue that the user should just put "-Wl," explicitly into
> LDFLAGS/LDFLAGS_FOR_TARGET when running "make", but that wouldn't work
> at the top level if you had some target subdirectories using libtool
> and others using "ld" directly.
That would be a bug. LDFLAGS are intended to be compiler driver
options; that's not a new requirement.
--
Daniel Jacobowitz
CodeSourcery, LLC