This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Java PATCH: Use libtool-ldflags


Target run-time libraries that are built with libtool are supposed to
use the libtool-ldflags script to quote LDFLAGS for libtool.  That's
already done for libstdc++ and libffi; this patch uses the same idiom
for boehm-gc and libjava.

Tested against a 4.3-based tree for arm-linux-gnueabi and against
mainline for x86_64-linux-gnu.

OK to apply?

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

2009-02-09  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.am (LTLDFLAGS): New variable.
	(LINK): Use it.
	* Makefile.in: Regenerated.

2009-02-09  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.am (LTLDFLAGS): Define.
	(GCJLINK): Use it.
	(LIBLINK): Likewise.
	* Makefile.in: Regenerated.

Index: boehm-gc/Makefile.am
===================================================================
--- boehm-gc/Makefile.am	(revision 144027)
+++ boehm-gc/Makefile.am	(working copy)
@@ -66,7 +66,8 @@ TESTS = gctest
 ## CFLAGS, not those passed in from the top level make.
 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) \
 	$(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
-LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
+LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
+LINK = $(LIBTOOL) --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
Index: libjava/Makefile.am
===================================================================
--- libjava/Makefile.am	(revision 144027)
+++ libjava/Makefile.am	(working copy)
@@ -128,12 +128,15 @@ if ANONVERSCRIPT
 extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
 endif
 
+LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
-          $(LDFLAGS) -o $@
+          $(LTLDFLAGS) -o $@
 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
 LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
-          $(LDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
+          $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
 
 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
 
popd


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