Package: binutils
Version: 2.21.53.20110720-1
Severity: important
Tags: patch
Justification: fails to build from source
User: [email protected]
Usertags: s390x

binutils FTBFS on s390x due do relocation issues:

| /home/aurel32/binutils/bfd/../libiberty/pic/libiberty.a(hashtab.o): In 
function `htab_create':
| /home/aurel32/binutils/libiberty/../../libiberty/hashtab.c:408:(.text+0x5e4): 
relocation truncated to fit: R_390_GOT12 against symbol `xcalloc' defined in 
.text section in 
/home/aurel32/binutils/bfd/../libiberty/pic/libiberty.a(xmalloc.o)
| /home/aurel32/binutils/bfd/../libiberty/pic/libiberty.a(hashtab.o): In 
function `htab_try_create':
| /home/aurel32/binutils/libiberty/../../libiberty/hashtab.c:414:(.text+0x61c): 
relocation truncated to fit: R_390_GOT12 against symbol `calloc@@GLIBC_2.2' 
defined in .text section in /lib/s390x-linux-gnu/libc.so.6
| collect2: ld returned 1 exit status

The patch below (already submitted upstream), fixes the issue.

diff -u binutils-2.21.53.20110720/debian/patches/series 
binutils-2.21.53.20110720/debian/patches/series
--- binutils-2.21.53.20110720/debian/patches/series
+++ binutils-2.21.53.20110720/debian/patches/series
@@ -20,0 +21 @@
+162_fpic_s390x.diff
--- binutils-2.21.53.20110720.orig/debian/patches/162_fpic_s390x.diff
+++ binutils-2.21.53.20110720/debian/patches/162_fpic_s390x.diff
@@ -0,0 +1,24 @@
+2011-07-23  Aurelien Jarno  <[email protected]>
+
+       * configure.ac: Use -fPIC instead of -fpic on s390x.
+
+--- a/libiberty/configure.ac
++++ b/libiberty/configure.ac
+@@ -216,6 +216,7 @@
+                         *-fpic* ) PICFLAG=-fpic ;;
+                         * ) PICFLAG=-fPIC ;;
+                       esac ;;
++    s390x*-*-*)               PICFLAG=-fPIC ;;
+     s390*-*-*)                PICFLAG=-fpic ;;
+     sh*-*-*)          PICFLAG=-fPIC ;;
+   esac
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -4865,6 +4865,7 @@
+                         *-fpic* ) PICFLAG=-fpic ;;
+                         * ) PICFLAG=-fPIC ;;
+                       esac ;;
++    s390x*-*-*)               PICFLAG=-fPIC ;;
+     s390*-*-*)                PICFLAG=-fpic ;;
+     sh*-*-*)          PICFLAG=-fPIC ;;
+   esac

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: s390x

Kernel: Linux 2.6.32-5-s390x (SMP w/3 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



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

Reply via email to