This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/N] LIBTOOLFLAGS, and *_LINK fixes for Automake 1.11


> - LIBTOOLFLAGS, and *_LINK fixes for Automake 1.11 (GCC only)

Automake handling of per-target LDFLAGS rules changed which means
that if you override *_LINK manually, you have to ensure that they
are used, too.

Automake introduced $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS)
(or per-target LIBTOOLFLAGS).  Add them where we manually override
$(LINK).  Also, add $(LIBTOOLFLAGS) where we use $(LIBTOOL) in
Makefile.in files not governed by automake.

When this patch is used with Automake 1.9.6, there is a small chance for
problems: its rules may now cause duplicate expansion of some of the
link flags.  If link flags duplication is a problem on some systems,
then this can cause failures.  I haven't tested this much.

OK to apply?

The boehm-gc changes appear in gcc-specific text, i.e., it already
differs from upstream anyway, so there is no need to go there.

Thanks,
Ralf

boehm-gc/ChangeLog:
2009-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (LTCOMPILE, LTLINK): Add $(AM_LIBTOOLFLAGS)
	and $(LIBTOOLFLAGS).
	* Makefile.in: Regenerate.

libgfortran/ChangeLog:
2009-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (libgfortran_la_LINK): Add $(libgfortran_la_LDFLAGS).
	* Makefile.in: Regenerate.

libjava/ChangeLog:
2009-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (libgcj_la_LINK, libgcj_tools_la_LINK)
	(lib_gnu_awt_xlib_la_LINK, libgcj_bc_la_LINK, jv_convert_LINK)
	(gcj_dbtool_LINK, gc_analyze_LINK, gij_LINK, ecjx_LINK)
	(gappletviewer_LINK, gjarsigner_LINK, gkeytool_LINK)
	(gjar_LINK, gjavah_LINK, gcjh_LINK, gnative2ascii_LINK)
	(gorbd_LINK, grmid_LINK, gserialver_LINK, gtnameserv_LINK)
	(grmic_LINK, grmiregistry_LINK, gjdoc_LINK): Add $(gjdoc_LDFLAGS).
	* Makefile.in: Regenerate.

libstdc++-v3/ChangeLog:
2009-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* libsupc++/Makefile.am (LTCOMPILE, LTCXXCOMPILE, CXXLINK): Add
	$(LIBTOOLFLAGS).
	* libsupc++/Makefile.in: Regenerate.
	* src/Makefile.am (LTCXXCOMPILE, CXXLINK): Add $(AM_LIBTOOLFLAGS)
	and $(LIBTOOLFLAGS).
	* src/Makefile.in: Regenerate.

libgomp/ChangeLog:
2009-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (LINK): Add $(AM_LIBTOOLFLAGS) and $(LIBTOOLFLAGS).
	* Makefile.in: Regenerate.

libobjc/ChangeLog:
2009-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in (LIBTOOL): Add $(LIBTOOLFLAGS).

diff --git a/boehm-gc/Makefile.am b/boehm-gc/Makefile.am
index 41528ae..83005b2 100644
--- a/boehm-gc/Makefile.am
+++ b/boehm-gc/Makefile.am
@@ -64,10 +64,12 @@ TESTS = gctest
 
 ## We have our own definition of LTCOMPILE because we want to use our
 ## CFLAGS, not those passed in from the top level make.
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) \
+LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
+	$(CC) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) \
 	$(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
-LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LTLDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LTLDFLAGS) -o $@
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index 4a974ba..83634ff 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -16,7 +16,7 @@ endif
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 
 toolexeclib_LTLIBRARIES = libgfortran.la
-libgfortran_la_LINK = $(LINK)
+libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS)
 libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran) $(version_arg)
 
 myexeclib_LTLIBRARIES = libgfortranbegin.la
diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am
index ebb4b6a..6cecc2a 100644
--- a/libgomp/Makefile.am
+++ b/libgomp/Makefile.am
@@ -43,8 +43,8 @@ endif
 
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 
-LINK = $(LIBTOOL) --tag CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LTLDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
 
 omp_lib_kinds.mod: omp_lib.mod
 	:
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 839d296..7c7e0db 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -298,7 +298,7 @@ libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
 if ANONVERSCRIPT
 libgcj_la_DEPENDENCIES += $(srcdir)/libgcj.ver
 endif
-libgcj_la_LINK = $(LIBLINK)
+libgcj_la_LINK = $(LIBLINK) $(libgcj_la_LDFLAGS)
 
 ## A hack to make sure the various gcj-related macros, like
 ## LTGCJCOMPILE, are defined by automake.  This is never actually
@@ -318,7 +318,7 @@ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
  -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
  $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
-libgcj_tools_la_LINK = $(LIBLINK)
+libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS)
 
 ## libjvm.so
 libjvm_la_SOURCES = jni-libjvm.cc
@@ -353,7 +353,7 @@ lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
 	@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
         -rpath $(toolexeclibdir) \
         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
-lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
+lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS)
 
 ## Support for libgcj_bc: dummy shared library.
 ##
@@ -363,7 +363,7 @@ libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
 	$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
 libgcj_bc_la_LIBADD = libgcj.la
 libgcj_bc_la_DEPENDENCIES = libgcj.la
-libgcj_bc_la_LINK = $(LIBLINK)
+libgcj_bc_la_LINK = $(LIBLINK) $(libgcj_bc_la_LDFLAGS)
 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
 ## USE_LIBGCJ_BC shouldn't be set on other targets.
 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
@@ -812,7 +812,7 @@ jv_convert_SOURCES =
 ## `.la' file.
 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-jv_convert_LINK = $(GCJLINK)
+jv_convert_LINK = $(GCJLINK) $(jv_convert_LDFLAGS)
 ## We don't explicitly link in the libraries we need; libgcj.la brings
 ## in all dependencies.  We need the -L so that gcj can find libgcj
 ## with `-lgcj', but it must come first, otherwise the -L flags
@@ -833,7 +833,7 @@ gnu/gcj/tools/gcj_dbtool/natMain.cc
 ## `.la' file.
 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gcj_dbtool_LINK = $(GCJLINK)
+gcj_dbtool_LINK = $(GCJLINK) $(gcj_dbtool_LDFLAGS)
 ## We don't explicitly link in the libraries we need; libgcj.la brings
 ## in all dependencies.  We need the -L so that gcj can find libgcj
 ## with `-lgcj', but it must come first, otherwise the -L flags
@@ -853,7 +853,7 @@ gc_analyze_SOURCES =
 ## `.la' file.
 gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gc_analyze_LINK = $(GCJLINK)
+gc_analyze_LINK = $(GCJLINK) $(gc_analyze_LDFLAGS)
 ## See jv_convert_LDADD.
 gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
 ## Depend on the spec file to make sure it is up to date before
@@ -867,7 +867,7 @@ gij_SOURCES =
 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
 	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
 	$(extra_gij_ldflags) 
-gij_LINK = $(GCJLINK)
+gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
 ## See jv_convert_LDADD.
 gij_LDADD = -L$(here)/.libs libgij.la
 ## Depend on the spec file to make sure it is up to date before
@@ -885,7 +885,7 @@ ECJX_BASE_FLAGS = -findirect-dispatch \
 
 if NATIVE
 
-ecjx_LINK = $(GCJLINK)
+ecjx_LINK = $(GCJLINK) $(ecjx_LDFLAGS)
 
 if ENABLE_SHARED
 ## Use ecj.jar at runtime.
@@ -905,7 +905,7 @@ endif
 
 else !NATIVE
 
-ecjx_LINK = $(GCJ_FOR_ECJX_LINK)
+ecjx_LINK = $(GCJ_FOR_ECJX_LINK) $(ecjx_LDFLAGS)
 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
 ecjx_LDADD = 
 ecjx_DEPENDENCIES = 
@@ -916,7 +916,7 @@ endif !NATIVE
 gappletviewer_SOURCES =
 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gappletviewer_LINK = $(GCJLINK)
+gappletviewer_LINK = $(GCJLINK) $(gappletviewer_LDFLAGS)
 ## See jv_convert_LDADD.
 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
 gappletviewer_DEPENDENCIES = libgcj-tools.la
@@ -925,7 +925,7 @@ gappletviewer_DEPENDENCIES = libgcj-tools.la
 gjarsigner_SOURCES =
 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gjarsigner_LINK = $(GCJLINK)
+gjarsigner_LINK = $(GCJLINK) $(gjarsigner_LDFLAGS)
 ## See jv_convert_LDADD.
 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
 gjarsigner_DEPENDENCIES = libgcj-tools.la
@@ -934,7 +934,7 @@ gjarsigner_DEPENDENCIES = libgcj-tools.la
 gkeytool_SOURCES =
 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gkeytool_LINK = $(GCJLINK)
+gkeytool_LINK = $(GCJLINK) $(gkeytool_LDFLAGS)
 ## See jv_convert_LDADD.
 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
 gkeytool_DEPENDENCIES = libgcj-tools.la
@@ -943,7 +943,7 @@ gkeytool_DEPENDENCIES = libgcj-tools.la
 gjar_SOURCES =
 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gjar_LINK = $(GCJLINK)
+gjar_LINK = $(GCJLINK) $(gjar_LDFLAGS)
 ## See jv_convert_LDADD.
 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
 gjar_DEPENDENCIES = libgcj-tools.la
@@ -952,7 +952,7 @@ gjar_DEPENDENCIES = libgcj-tools.la
 gjavah_SOURCES =
 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gjavah_LINK = $(GCJLINK)
+gjavah_LINK = $(GCJLINK) $(gjavah_LDFLAGS)
 ## See jv_convert_LDADD.
 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
 gjavah_DEPENDENCIES = libgcj-tools.la
@@ -961,7 +961,7 @@ gjavah_DEPENDENCIES = libgcj-tools.la
 gcjh_SOURCES =
 gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gcjh_LINK = $(GCJLINK)
+gcjh_LINK = $(GCJLINK) $(gcjh_LDFLAGS)
 ## See jv_convert_LDADD.
 gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
 gcjh_DEPENDENCIES = libgcj-tools.la
@@ -970,7 +970,7 @@ gcjh_DEPENDENCIES = libgcj-tools.la
 gnative2ascii_SOURCES =
 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gnative2ascii_LINK = $(GCJLINK)
+gnative2ascii_LINK = $(GCJLINK) $(gnative2ascii_LDFLAGS)
 ## See jv_convert_LDADD.
 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
 gnative2ascii_DEPENDENCIES = libgcj-tools.la
@@ -979,7 +979,7 @@ gnative2ascii_DEPENDENCIES = libgcj-tools.la
 gorbd_SOURCES =
 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gorbd_LINK = $(GCJLINK)
+gorbd_LINK = $(GCJLINK) $(gorbd_LDFLAGS)
 ## See jv_convert_LDADD.
 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
 gorbd_DEPENDENCIES = libgcj-tools.la
@@ -988,7 +988,7 @@ gorbd_DEPENDENCIES = libgcj-tools.la
 grmid_SOURCES =
 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-grmid_LINK = $(GCJLINK)
+grmid_LINK = $(GCJLINK) $(grmid_LDFLAGS)
 ## See jv_convert_LDADD.
 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
 grmid_DEPENDENCIES = libgcj-tools.la
@@ -997,7 +997,7 @@ grmid_DEPENDENCIES = libgcj-tools.la
 gserialver_SOURCES =
 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gserialver_LINK = $(GCJLINK)
+gserialver_LINK = $(GCJLINK) $(gserialver_LDFLAGS)
 ## See jv_convert_LDADD.
 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
 gserialver_DEPENDENCIES = libgcj-tools.la
@@ -1006,7 +1006,7 @@ gserialver_DEPENDENCIES = libgcj-tools.la
 gtnameserv_SOURCES =
 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gtnameserv_LINK = $(GCJLINK)
+gtnameserv_LINK = $(GCJLINK) $(gtnameserv_LDFLAGS)
 ## See jv_convert_LDADD.
 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
 gtnameserv_DEPENDENCIES = libgcj-tools.la
@@ -1015,7 +1015,7 @@ gtnameserv_DEPENDENCIES = libgcj-tools.la
 grmic_SOURCES =
 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-grmic_LINK = $(GCJLINK)
+grmic_LINK = $(GCJLINK) $(grmic_LDFLAGS)
 ## See jv_convert_LDADD.
 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
 grmic_DEPENDENCIES = libgcj-tools.la
@@ -1024,7 +1024,7 @@ grmic_DEPENDENCIES = libgcj-tools.la
 grmiregistry_SOURCES =
 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-grmiregistry_LINK = $(GCJLINK)
+grmiregistry_LINK = $(GCJLINK) $(grmiregistry_LDFLAGS)
 ## See jv_convert_LDADD.
 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
 grmiregistry_DEPENDENCIES = libgcj-tools.la
@@ -1034,7 +1034,7 @@ gjdoc_SOURCES =
 gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
 	-Djava.class.path=$(ANTLR_JAR) \
 	-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
-gjdoc_LINK = $(GCJLINK)
+gjdoc_LINK = $(GCJLINK) $(gjdoc_LDFLAGS)
 ## See jv_convert_LDADD.
 gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
 gjdoc_DEPENDENCIES = libgcj-tools.la
diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in
index 98539cf..788dfb5 100644
--- a/libobjc/Makefile.in
+++ b/libobjc/Makefile.in
@@ -85,7 +85,7 @@ ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
 # numbers.
 LIBOBJC_VERSION = @VERSION@
 LIBOBJC_GC_VERSION = @VERSION@
-LIBTOOL = @LIBTOOL@
+LIBTOOL = @LIBTOOL@ $(LIBTOOLFLAGS)
 LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
 LIBTOOL_LINK    = $(LIBTOOL) --mode=link 
 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am
index b84b5e4..d012da9 100644
--- a/libstdc++-v3/libsupc++/Makefile.am
+++ b/libstdc++-v3/libsupc++/Makefile.am
@@ -116,8 +116,8 @@ C_COMPILE = \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 
 # LTCOMPILE is copied from LTCXXCOMPILE below.
-LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
-	    $(DEFS) $(C_INCLUDES) $(LIBSUPCXX_PICFLAGS) \
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(LIBTOOLFLAGS) \
+	    $(CC) $(DEFS) $(C_INCLUDES) $(LIBSUPCXX_PICFLAGS) \
             $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 
 cp-demangle.c:
@@ -150,7 +150,7 @@ cp-demangle.o: cp-demangle.c
 #
 # We have to put --tag disable-shared after --tag CXX lest things
 # CXX undo the affect of disable-shared.
-LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
 	       --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
 	       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 
 
@@ -162,7 +162,7 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 # course is problematic at this point.  So, we get the top-level
 # directory to configure libstdc++-v3 to use gcc as the C++
 # compilation driver.
-CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
+CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
 	  --mode=link $(CXX) \
 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
 
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 4295d4d..2c8b3ac 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -342,8 +342,8 @@ AM_CXXFLAGS = \
 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
 # attempt to infer which configuration to use
-LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
-	       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	       $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 
@@ -353,8 +353,8 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 # course is problematic at this point.  So, we get the top-level
 # directory to configure libstdc++-v3 to use gcc as the C++
 # compilation driver.
-CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
-	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	  $(CXX) $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
 
 
 # Added bits to build debug library.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]