Package: gtk+2.0
Version: 2.8.20-1
Severity: wishlist
Tags: patch

Hello,

when building 'gtk+2.0' on ppc64/unstable, I get the following error:

/bin/sh ../libtool --mode=link powerpc64-linux-gnu-gcc  -g -O2 -Wall   -o 
gtk-query-immodules-2.0  queryimmodules.o libgtk-x11-2.0.la 
../gdk-pixbuf/libgdk_pixbuf-2.0.la ../gdk/libgdk-x11-2.0.la 
powerpc64-linux-gnu-gcc -g -O2 -Wall -o gtk-query-immodules-2.0 
queryimmodules.o  ./.libs/libgtk-x11-2.0.a 
/gtk+2.0-2.8.20/build-tree/gtk+-2.8.20-static/gdk/.libs/libgdk-x11-2.0.a 
/usr/lib/libatk-1.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.a 
../gdk/.libs/libgdk-x11-2.0.a /usr/lib/libpangocairo-1.0.so -lSM -lICE 
/usr/lib/libpangoft2-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libcairo.so 
/usr/lib/libfreetype.so -lfontconfig -lXext -lXrender -lX11 -lXinerama -lXi 
-lXrandr -lXcursor -lXfixes 
/gtk+2.0-2.8.20/build-tree/gtk+-2.8.20-static/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.a
 /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libgobject-2.0.so 
/usr/lib/libglib-2.0.so /usr/lib/libtiff.so -lz -lc /usr/lib/libjpeg.so -lpng12 
-lm
/usr/bin/ld: 
/gtk+2.0-2.8.20/build-tree/gtk+-2.8.20-static/gdk/.libs/libgdk-x11-2.0.a(gdk.o)(.text+0x574):
 sibling call optimization to `IA__gdk_display_open' does not allow automatic 
multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or 
make `IA__gdk_display_open' extern
/usr/bin/ld: 
/gtk+2.0-2.8.20/build-tree/gtk+-2.8.20-static/gdk/.libs/libgdk-x11-2.0.a(gdk.o)(.text+0x5ec):
 sibling call optimization to `IA__gdk_display_open' does not allow automatic 
multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or 
make `IA__gdk_display_open' extern
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[5]: *** [gtk-query-immodules-2.0] Error 1
make[5]: Leaving directory `/gtk+2.0-2.8.20/build-tree/gtk+-2.8.20-static/gtk'

With the attached patch, which adds '-mminimal-toc' to CFLAGS
for each call of 'configure', the packages can be compiled on ppc64.

Regards
Andreas Jochens

diff -urN ../tmp-orig/gtk+2.0-2.8.20/debian/rules ./debian/rules
--- ../tmp-orig/gtk+2.0-2.8.20/debian/rules     2006-09-10 09:44:19.000000000 
+0000
+++ ./debian/rules      2006-09-10 08:29:57.000000000 +0000
@@ -16,7 +16,11 @@
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE     ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_GNU_CPU      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
 
+ifeq ($(DEB_BUILD_GNU_CPU),powerpc64)
+       CFLAGS += -mminimal-toc
+endif
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -86,7 +90,7 @@
        cp -ar $(BUILD_DIR) $(BUILD_SHARED_DIR)
 
        # Add here commands to configure the package.
-       cd $(BUILD_SHARED_DIR) && \
+       cd $(BUILD_SHARED_DIR) && CFLAGS="$(CFLAGS)" \
        ./configure     --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr \
@@ -114,7 +118,7 @@
        cp -ar $(BUILD_DIR) $(BUILD_STATIC_DIR)
 
        # Add here commands to configure the package.
-       cd $(BUILD_STATIC_DIR) && \
+       cd $(BUILD_STATIC_DIR) && CFLAGS="$(CFLAGS)" \
        ./configure     --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr \
@@ -143,7 +147,7 @@
        cp -ar $(BUILD_DIR) $(BUILD_DFB_DIR)
 
        # Add here commands to configure the package.
-       cd $(BUILD_DFB_DIR) && \
+       cd $(BUILD_DFB_DIR) && CFLAGS="$(CFLAGS)" \
        ./configure     --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr \


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to