Gentoo Archives: gentoo-commits

From: Mark Wright <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lisp/sbcl/, dev-lisp/sbcl/files/
Date: Wed, 01 Mar 2017 12:57:39
Message-Id: 1488373027.4d54b1daeefc0acd44a6d8971c70104a534ed853.gienah@gentoo
1 commit: 4d54b1daeefc0acd44a6d8971c70104a534ed853
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 1 12:57:07 2017 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 1 12:57:07 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d54b1da
7
8 dev-lisp/sbcl: Fix the detection of -nopie and -no-pie.
9
10 The change 3403dbaffc0a9bab49b78cf0bb5308cce0a0c153 that upstream did for
11 https://bugs.launchpad.net/sbcl/+bug/1633559 does not work on Gentoo. So
12 it was patched out in the fix for #607302 with sbcl-1.3.14-config.patch,
13 which unfortunately leads to #583930. Thanks to Toralf Forster for
14 reporting, and grozin for testing.
15
16 Gentoo-bug: 599902, 607302, 583930
17
18 Package-Manager: portage-2.3.3
19
20 dev-lisp/sbcl/files/sbcl-1.3.14-config.patch | 22 ----------------------
21 ...4-gentoo-fix_nopie_for_hardened_toolchain.patch | 17 +++++++++++++++++
22 dev-lisp/sbcl/sbcl-1.3.14.ebuild | 11 +++--------
23 3 files changed, 20 insertions(+), 30 deletions(-)
24
25 diff --git a/dev-lisp/sbcl/files/sbcl-1.3.14-config.patch b/dev-lisp/sbcl/files/sbcl-1.3.14-config.patch
26 deleted file mode 100644
27 index c12700d0d6f..00000000000
28 --- a/dev-lisp/sbcl/files/sbcl-1.3.14-config.patch
29 +++ /dev/null
30 @@ -1,22 +0,0 @@
31 -diff -Nuar a/src/runtime/GNUmakefile b/src/runtime/GNUmakefile
32 ---- a/src/runtime/GNUmakefile 2017-01-22 20:43:20.000000000 +0100
33 -+++ b/src/runtime/GNUmakefile 2017-02-09 15:42:22.340029401 +0100
34 -@@ -39,18 +39,6 @@
35 - # OS_SRC, OS_LIBS, OS_CLEAN_FILES
36 - include Config
37 -
38 --# Disable PIE when possible
39 --ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e no-pie),)
40 --CFLAGS += -fno-pie
41 --LINKFLAGS += -no-pie
42 --LDFLAGS += -no-pie
43 --endif
44 --ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e -nopie),)
45 --CFLAGS += -fno-pie
46 --LINKFLAGS += -nopie
47 --LDFLAGS += -nopie
48 --endif
49 --
50 - COMMON_SRC = alloc.c backtrace.c breakpoint.c coreparse.c dynbind.c \
51 - funcall.c gc-common.c globals.c interr.c interrupt.c \
52 - largefile.c monitor.c os-common.c parse.c print.c purify.c \
53
54 diff --git a/dev-lisp/sbcl/files/sbcl-1.3.14-gentoo-fix_nopie_for_hardened_toolchain.patch b/dev-lisp/sbcl/files/sbcl-1.3.14-gentoo-fix_nopie_for_hardened_toolchain.patch
55 new file mode 100644
56 index 00000000000..aa74a2d6135
57 --- /dev/null
58 +++ b/dev-lisp/sbcl/files/sbcl-1.3.14-gentoo-fix_nopie_for_hardened_toolchain.patch
59 @@ -0,0 +1,17 @@
60 +--- sbcl-1.3.14-orig/src/runtime/GNUmakefile 2017-01-23 06:43:20.000000000 +1100
61 ++++ sbcl-1.3.14/src/runtime/GNUmakefile 2017-02-28 12:44:37.627161988 +1100
62 +@@ -40,12 +40,12 @@
63 + include Config
64 +
65 + # Disable PIE when possible
66 +-ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e no-pie),)
67 ++ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e '[^f]no-pie'),)
68 + CFLAGS += -fno-pie
69 + LINKFLAGS += -no-pie
70 + LDFLAGS += -no-pie
71 + endif
72 +-ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e -nopie),)
73 ++ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e '[^f]nopie'),)
74 + CFLAGS += -fno-pie
75 + LINKFLAGS += -nopie
76 + LDFLAGS += -nopie
77
78 diff --git a/dev-lisp/sbcl/sbcl-1.3.14.ebuild b/dev-lisp/sbcl/sbcl-1.3.14.ebuild
79 index cd554d0f16c..0dcdad37d0b 100644
80 --- a/dev-lisp/sbcl/sbcl-1.3.14.ebuild
81 +++ b/dev-lisp/sbcl/sbcl-1.3.14.ebuild
82 @@ -1,5 +1,6 @@
83 # Copyright 1999-2017 Gentoo Foundation
84 # Distributed under the terms of the GNU General Public License v2
85 +# $Id$
86
87 EAPI=6
88 inherit multilib eutils flag-o-matic pax-utils
89 @@ -100,18 +101,12 @@ src_prepare() {
90 eapply "${FILESDIR}"/bsd-sockets-test-1.3.12.patch
91 # bugs #560276, #561018
92 eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch
93 - # bug #599902, #607302
94 - eapply "${FILESDIR}"/${PN}-1.3.14-config.patch
95 + # bug #599902, #607302, #583930
96 + eapply "${FILESDIR}"/${PN}-1.3.14-gentoo-fix_nopie_for_hardened_toolchain.patch
97
98 eapply "${FILESDIR}"/${PN}-1.2.11-solaris.patch
99 eapply "${FILESDIR}"/${PN}-1.2.13-verbose-build.patch
100
101 - # To make the hardened compiler NOT compile with -fPIE -pie
102 - if gcc-specs-pie ; then
103 - einfo "Disabling PIE..."
104 - eapply "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
105 - fi
106 -
107 eapply_user
108
109 # bug #526194