incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Janík <Pa...@Janik.cz>
Subject LinuxPPC: gccinstlib.pl and linker script
Date Mon, 01 Oct 2012 16:48:40 GMT
Hi,

on my Linux/PPC box (Debian 6.0.5): gcc --print-file-name libgcc_s.so prints:

/usr/lib/gcc/powerpc-linux-gnu/4.4.5/libgcc_s.so

This file is a linker script:

/* GNU ld script
...

not a real ELF library. This breaks the expectation of the gccinstlib.pl script.

To workaround this, I have changed my makefile.mk this way:

Index: external/gcc3_specific/makefile.mk
===================================================================
--- external/gcc3_specific/makefile.mk	(revision 1392434)
+++ external/gcc3_specific/makefile.mk	(working copy)
@@ -75,6 +75,10 @@
 
 $(LB)$/libgcc_s.so.$(SHORTSTDC3) :
 	$(GCCINSTLIB) libgcc_s.so.$(SHORTSTDC3) $(LB)
+# Workaround Debian 6.0.5/PPC issue where gcc -print-file-name returns
+# path of the linker script instead of the path to the library itself
+# Maybe this should be fixed in gccinstlib.pl instead.
+	head -n 1 $(LB)/libgcc_s.so.$(SHORTSTDC3) | grep "GNU ld script" >/dev/null &&
$(COPY) /lib/libgcc_s.so.1 $(LB)/libgcc_s.so.$(SHORTSTDC3)
 
 .ENDIF
 .ENDIF 

What do you think about this change? Who knows gcc/linker more than me?
-- 
Pavel Janík




Mime
View raw message