Package: gcl Version: 2.6.12-32 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu yakkety ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following: * Set CC to 'gcc -fno-pie -no-pie' to prevent FTBFS (LP: #1557236) The patch itself should be self-explanatory. In Ubuntu, we now default to '-fPIE -pie' on amd64, ppc64el, and s390x. Turns out that gcl, when compiled with -fPIE breaks rather spectacularly. This patch should be a no-op for Debian, but it's good future-proofing against a time when Debian may choose to change their defaults as well. Compare build resutls before: https://launchpad.net/ubuntu/+source/gcl/2.6.12-32 And after: https://launchpad.net/ubuntu/+source/gcl/2.6.12-32ubuntu1 ... Adam -- System Information: Debian Release: stretch/sid APT prefers yakkety-updates APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 'yakkety') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-21-lowlatency (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -Nru gcl-2.6.12/debian/rules gcl-2.6.12/debian/rules --- gcl-2.6.12/debian/rules 2016-04-05 18:13:43.000000000 -0600 +++ gcl-2.6.12/debian/rules 2016-04-27 14:33:26.000000000 -0600 @@ -12,6 +12,10 @@ # This is the debhelper compatability version to use. ARCHT:=$(shell dpkg-architecture -qDEB_HOST_ARCH) +# gcl breaks when built with a compiler that sets '-fPIE -pie' by default +# so we explicitly set CC to "$(MCC) $(PIE)" to pretend we're not. +PIE:=-fno-pie -no-pie + MCC:=gcc # ifeq ($(ARCHT),alpha) # MCC:=gcc-4.6 @@ -87,7 +91,7 @@ [ "$*" != "trad" ] || FLAGS="--disable-ansi" ; \ [ "$*" != "gprof" ] || FLAGS="--disable-ansi --enable-gprof" ; \ [ "$*" != "ansi-gprof" ] || FLAGS="--enable-gprof" ; \ - eval `dpkg-buildflags --export=sh` && CC=$(MCC) ./configure \ + eval `dpkg-buildflags --export=sh` && CC="$(MCC) $(PIE)" ./configure \ --host=$$(dpkg-architecture -qDEB_HOST_GNU_TYPE) \ --disable-statsysbfd \ --disable-custreloc \