PATCH: LDFLAGS handling in V3
Daniel Jacobowitz
drow@false.org
Sun Jan 1 17:09:00 GMT 2006
On Fri, Dec 30, 2005 at 10:17:54PM -0800, Mark Mitchell wrote:
> To refresh your memory, the point of this patch is that, at present,
> putting "--sysroot=..." in LDFLAGS_FOR_TARGET at the top level does not
> work, because libtool turns that into -Wl,--sysroot, which means the
> driver never sees it, which means that it does not find things like
> crt1.o. We agreed that LDFLAGS_FOR_TARGET was meant to be options to
> the driver, and that, therefore, we needed to specifically mark these
> options with -Xcompiler when passing them to libtool.
...
> 2005-12-30 Mark Mitchell <mark@codesourcery.com>
>
> * src/Makefile.am (LTLDFLAGS): New variable.
> (CXXLINK): Use it.
> * libsupc++/Makefile.am (LLDFLAGS): New variable.
> (CXXLINK): Use it.
> * src/Makefile.in: Regenerated.
> * libsupc++/Makefile.in: Likewise.
How can this be in the right place? As far as I can see it will affect
every subdirectory using libtool. Heck, maybe the toplevel Makefile
should handle it.
> Index: libtool-ldflags
> ===================================================================
> --- libtool-ldflags (revision 0)
> +++ libtool-ldflags (revision 0)
> @@ -0,0 +1,97 @@
> +#! /bin/sh
> +LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
You should use $(CONFIG_SHELL) here, I think?
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Gcc-patches
mailing list