runtime config for x86 linux adds incorrect gcc -nopie flag

Bug #1576871 reported by Steve Beattie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned
sbcl (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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 the following code snippets:

  # Hardened GCC enables PIE by default
  ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e nopie),)
  CFLAGS += -fno-pie
  LINKFLAGS += -nopie
  LDFLAGS += -nopie
  endif

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.

Tags: patch
Revision history for this message
Steve Beattie (sbeattie) wrote :

Patch to fix the -no-pie arguments.

Revision history for this message
Steve Beattie (sbeattie) wrote :

And here's the the debdiff that incorporates the prior patch into the sbcl 1.3.3-1ubuntu1 package that FTBFS in yakkety -proposed.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-no-pie-linux.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sbcl - 2:1.3.3-1ubuntu2

---------------
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 <email address hidden> Fri, 29 Apr 2016 14:51:47 -0700

Changed in sbcl (Ubuntu):
status: New → Fix Released
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.