You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Pavel Janík <Pa...@Janik.cz> on 2012/10/01 18:48:40 UTC
LinuxPPC: gccinstlib.pl and linker script
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