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