Control: tags -1 +patch

The patch I found in Ubuntu for this bug is attached,

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Author: Steve Beattie <steve.beat...@canonical.com>
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 <steve.beat...@canonical.com>
---
 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

Reply via email to