[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#364394: gcc-snapshot: FTBFS (ppc64): /usr/bin/ld: cannot find -lc



Package: gcc-snapshot
Version: 20060419-1
Severity: wishlist
Tags: patch

When building 'gcc-snapshot' on ppc64/unstable,
I get the following error:

/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[6]: *** [32/libgcc_s.so] Error 1

With the attached patch 'gcc-snapshot' can be compiled on ppc64.

The patch changes 'debian/ppc64-biarch.dpatch' so that the patch
applies to the new snapshot version.

It also changes debian/rules.patch to apply the ppc64-biarch.dpatch
and the ppc64-ada.dpatch patches even if 'biarch32' is disabled.
The build fails if those patches are not applied.

Regards
Andreas Jochens

diff -urN ../tmp-orig/gcc-snapshot-20060419/debian/patches/ppc64-biarch.dpatch ./debian/patches/ppc64-biarch.dpatch
--- ../tmp-orig/gcc-snapshot-20060419/debian/patches/ppc64-biarch.dpatch	2006-04-19 20:38:10.000000000 +0000
+++ ./debian/patches/ppc64-biarch.dpatch	2006-04-21 12:36:01.000000000 +0000
@@ -44,20 +44,6 @@
  
  # We want fine grained libraries, so use the new code to build the
  # floating point emulation libraries.
-@@ -37,8 +34,11 @@
- mklibgcc: bispecs
- 
- bispecs: specs
--	if [ x`$(GCC_FOR_TARGET) -print-multi-os-directory` = x../lib ]; then \
-+	touch f-test.c; \
-+	$(GCC_FOR_TARGET) -c f-test.c -o f-test.o; \
-+	if [ "x`file f-test.o | grep 64-bit`" = "x" ]; then \
- 	  sed -e '/cc1_options/{ n; s/$$/ %{m64:-mlong-double-128}/; }' < specs > $@; \
- 	else \
- 	  sed -e '/cc1_options/{ n; s/$$/ %{!m32:-mlong-double-128}/; }' < specs > $@; \
--	fi
-+	fi; \
-+	rm f-test.c f-test.o;
 diff -urN tmp/libjava/configure.host src/libjava/configure.host
 --- tmp/libjava/configure.host	25 Nov 2004 03:46:56 -0000
 +++ src/libjava/configure.host	15 Dec 2004 15:45:22 -0000
diff -urN ../tmp-orig/gcc-snapshot-20060419/debian/rules.patch ./debian/rules.patch
--- ../tmp-orig/gcc-snapshot-20060419/debian/rules.patch	2006-04-19 20:51:37.000000000 +0000
+++ ./debian/rules.patch	2006-04-22 06:40:38.000000000 +0000
@@ -136,15 +136,14 @@
     debian_patches += amd64-biarch
     debian_patches += libjava-ia32fix
   endif
-  ifeq ($(DEB_TARGET_ARCH),ppc64)
-    # FIXME: needed for 4.1?
-    debian_patches += ppc64-biarch ppc64-ada
-  endif
   ifneq ($(with_32bit_check),yes)
     debian_patches += disable-configure-run-check
   endif
 endif
 
+ifeq ($(DEB_TARGET_ARCH),ppc64)
+  debian_patches += ppc64-biarch ppc64-ada
+endif
 
 patch: $(patch_stamp)
 $(patch_stamp): $(unpack_stamp) pre-patch \



Reply to: