diff -Nru sbcl-1.3.3/debian/changelog sbcl-1.3.3/debian/changelog --- sbcl-1.3.3/debian/changelog 2016-04-26 16:51:34.000000000 -0700 +++ sbcl-1.3.3/debian/changelog 2016-04-29 14:52:53.000000000 -0700 @@ -1,3 +1,10 @@ +sbcl (2:1.3.3-1ubuntu2) yakkety; urgency=medium + + * debian/patches/fix-no-pie-linux.patch: detect and pass the correct + -no-pie flags to GCC to disable -fPIE. (LP: #1576871) + + -- Steve Beattie Fri, 29 Apr 2016 14:51:47 -0700 + sbcl (2:1.3.3-1ubuntu1) yakkety; urgency=medium * Merge from Debian unstable. Remaining changes: diff -Nru sbcl-1.3.3/debian/patches/fix-no-pie-linux.patch sbcl-1.3.3/debian/patches/fix-no-pie-linux.patch --- sbcl-1.3.3/debian/patches/fix-no-pie-linux.patch 1969-12-31 16:00:00.000000000 -0800 +++ sbcl-1.3.3/debian/patches/fix-no-pie-linux.patch 2016-04-29 14:51:34.000000000 -0700 @@ -0,0 +1,64 @@ +Author: Steve Beattie +Subject: make -no-pie arguments consistent with upstream GCC +Bug: https://bugs.launchpad.net/ubuntu/+source/sbcl/+bug/1576871 + +SBCL fails to build when gcc is configure to +generate Position Independent Binaries. The runtime +configs for SBCL in sbcl/src/runtime/Config.x86-linux and +sbcl/src/runtime/Config.x86-64-linux attempt to take this into account +via detecting and adding the -nopie flag. + +However, upstream gcc has standardized on the -no-pie flag (note +embedded hyphen): + + https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/doc/invoke.texi;h=515d948ce710a2fba98c586ea2efa05d4cf60979;hb=HEAD#l10620 + +as of upstream commit: + + https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e9abca4f4a48fa8b1fd9778f6a3cd748e099e3bb + +This causes SBCL to FTBFS in Ubuntu 16.10 on amd64 where -pie is +enabled by default in gcc. + +Signed-off-by: Steve Beattie +--- + src/runtime/Config.x86-64-linux | 6 +++--- + src/runtime/Config.x86-linux | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +Index: b/src/runtime/Config.x86-64-linux +=================================================================== +--- a/src/runtime/Config.x86-64-linux ++++ b/src/runtime/Config.x86-64-linux +@@ -47,10 +47,10 @@ CFLAGS += -fno-omit-frame-pointer + GC_SRC = gencgc.c + + # Hardened GCC enables PIE by default +-ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e nopie),) ++ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e no-pie),) + CFLAGS += -fno-pie +-LINKFLAGS += -nopie +-LDFLAGS += -nopie ++LINKFLAGS += -no-pie ++LDFLAGS += -no-pie + endif + + # Nothing to do for after-grovel-headers. +Index: b/src/runtime/Config.x86-linux +=================================================================== +--- a/src/runtime/Config.x86-linux ++++ b/src/runtime/Config.x86-linux +@@ -43,10 +43,10 @@ ifdef LISP_FEATURE_SB_CORE_COMPRESSION + endif + + # Hardened GCC enables PIE by default +-ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e nopie),) ++ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e no-pie'),) + CFLAGS += -fno-pie +-LINKFLAGS += -nopie +-LDFLAGS += -nopie ++LINKFLAGS += -no-pie ++LDFLAGS += -no-pie + endif + + GC_SRC = gencgc.c diff -Nru sbcl-1.3.3/debian/patches/series sbcl-1.3.3/debian/patches/series --- sbcl-1.3.3/debian/patches/series 2016-03-19 19:42:06.000000000 -0700 +++ sbcl-1.3.3/debian/patches/series 2016-04-29 14:49:28.000000000 -0700 @@ -9,3 +9,4 @@ kfreebsd-pthread-futex.patch powerpc-concurrency-fix.patch fix-texinfo-ftbfs +fix-no-pie-linux.patch