Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: dev-lisp/sbcl/
Date: Mon, 13 Nov 2017 22:13:21
Message-Id: 1510611012.d4d1d114924a83329ffdc267ba5784ecf6d25339.nimiux@gentoo
1 commit: d4d1d114924a83329ffdc267ba5784ecf6d25339
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 13 22:10:12 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 13 22:10:12 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=d4d1d114
7
8 dev-lisp/sbcl: Fix CFLAGS and LINKFLAGS to let users override the default values
9
10 dev-lisp/sbcl/sbcl-1.4.1.ebuild | 20 +++++++++++++-------
11 1 file changed, 13 insertions(+), 7 deletions(-)
12
13 diff --git a/dev-lisp/sbcl/sbcl-1.4.1.ebuild b/dev-lisp/sbcl/sbcl-1.4.1.ebuild
14 index adb1f0e2..df43a9fe 100644
15 --- a/dev-lisp/sbcl/sbcl-1.4.1.ebuild
16 +++ b/dev-lisp/sbcl/sbcl-1.4.1.ebuild
17 @@ -107,11 +107,19 @@ src_prepare() {
18
19 eapply_user
20
21 - # bugs #526194, #620532
22 - sed -e "s@CFLAGS +=.*\$@CFLAGS = ${CFLAGS} -Wall -Wsign-compare -Wpointer-arith@" \
23 - -e "s@LINKFLAGS += -g\$@LINKFLAGS = ${LDFLAGS}@" \
24 - -e "s@LINKFLAGS += -no-pie\$@LINKFLAGS = ${LDFLAGS} -no-pie@" \
25 - -e "s@LINKFLAGS += -nopie\$@LINKFLAGS = ${LDFLAGS} -nopie@" \
26 + # Make sure the *FLAGS variables are sane.
27 + # sbcl needs symbols in resulting binaries, so building with the -s linker flag will fail.
28 + strip-unsupported-flags
29 + filter-flags -fomit-frame-pointer -Wl,-s
30 + filter-ldflags -s
31 +
32 + # original bugs #526194, #620532
33 + # this broke no-pie default builds, c.f. bug #632670
34 + # Pass CFLAGS down by appending our value, to let users override
35 + # the default values.
36 + # Keep passing LDFLAGS down via the LINKFLAGS variable.
37 + sed -e "s@\(CFLAGS += -g .*\)\$@\1 ${CFLAGS}@" \
38 + -e "s@LINKFLAGS += -g\$@LINKFLAGS += ${LDFLAGS}@" \
39 -i src/runtime/GNUmakefile || die
40
41 sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
42 @@ -148,8 +156,6 @@ src_configure() {
43 src_compile() {
44 local bindir="${WORKDIR}"/sbcl-binary
45
46 - strip-unsupported-flags ; filter-flags -fomit-frame-pointer
47 -
48 if use pax_kernel ; then
49 # To disable PaX on hardened systems
50 pax-mark -mr "${bindir}"/src/runtime/sbcl