diff mbox

[build,objc] Link libobjc*.la with -shared-libgcc

Message ID ydd1v58iv92.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Dec. 23, 2010, 11:28 a.m. UTC
Andrew Pinski <pinskia@gmail.com> writes:

> On Wed, Dec 22, 2010 at 7:15 AM, Rainer Orth
> <ro@cebitec.uni-bielefeld.de> wrote:
>>
>> As described in the third link, 6 bootstraps (i386 and sparc, sun ld
>> with as, gas, gld with gas) are currently running.  Ok for mainline if
>> they all pass?
>>
>> Thanks.
>>        Rainer
>>
>>
>> 2010-12-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>
>>        * Makefile.in (libobjc$(libsuffix).la): Link with -shared-libgcc.
>>        (libobjc_gc$(libsuffix).la): Likewise.
>
> Yes this is ok.

Thanks.  Actual testing revealed that a plain -shared-libgcc is
swallowed by libtool, but using -Wc,-shared-libgcc works as expected.
So here's the actual patch I've checked in.  Libtool continues to remain
a mystery to me ;-)

	Rainer


2010-12-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* Makefile.in (libobjc$(libsuffix).la): Link with -Wc,-shared-libgcc.
	(libobjc_gc$(libsuffix).la): Likewise.
diff mbox

Patch

diff -r ba5f37177ba3 libobjc/Makefile.in
--- a/libobjc/Makefile.in	Wed Dec 22 12:22:52 2010 +0100
+++ b/libobjc/Makefile.in	Wed Dec 22 17:08:02 2010 +0100
@@ -1,6 +1,6 @@ 
 # Makefile for GNU Objective C runtime library.
 # Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -325,13 +325,13 @@ 
 
 libobjc$(libsuffix).la: $(OBJS)
 	$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
-		-rpath $(toolexeclibdir) \
+		-Wc,-shared-libgcc -rpath $(toolexeclibdir) \
 		-version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc) \
 		$(LTLDFLAGS)
 
 libobjc_gc$(libsuffix).la: $(OBJS_GC)
 	$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) $(OBJC_BOEHM_GC_LIBS) \
-		-rpath $(toolexeclibdir) \
+		-Wc,-shared-libgcc -rpath $(toolexeclibdir) \
 		-version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \
 		$(LTLDFLAGS)