summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChema Alonso Josa <nimiux@gentoo.org>2017-11-13 23:12:00 +0100
committerChema Alonso Josa <nimiux@gentoo.org>2017-11-13 23:12:00 +0100
commitba66c87fafb87b82c38b36575e0e1c764dcd4792 (patch)
tree671628652c4d99d4480f345124317fc688d9de03
parentdev-libs/libsass: version bump to 3.4.6 (diff)
downloadgentoo-ba66c87f.tar.gz
gentoo-ba66c87f.tar.bz2
gentoo-ba66c87f.zip
dev-lisp/sbcl: Fix CFLAGS and LINKFLAGS to let users override the default values
Bug: https://bugs.gentoo.org/632670 Package-Manager: Portage-2.3.8, Repoman-2.3.3
-rw-r--r--dev-lisp/sbcl/sbcl-1.4.1.ebuild20
1 files changed, 13 insertions, 7 deletions
diff --git a/dev-lisp/sbcl/sbcl-1.4.1.ebuild b/dev-lisp/sbcl/sbcl-1.4.1.ebuild
index adb1f0e29a52..df43a9fecd14 100644
--- a/dev-lisp/sbcl/sbcl-1.4.1.ebuild
+++ b/dev-lisp/sbcl/sbcl-1.4.1.ebuild
@@ -107,11 +107,19 @@ src_prepare() {
eapply_user
- # bugs #526194, #620532
- sed -e "s@CFLAGS +=.*\$@CFLAGS = ${CFLAGS} -Wall -Wsign-compare -Wpointer-arith@" \
- -e "s@LINKFLAGS += -g\$@LINKFLAGS = ${LDFLAGS}@" \
- -e "s@LINKFLAGS += -no-pie\$@LINKFLAGS = ${LDFLAGS} -no-pie@" \
- -e "s@LINKFLAGS += -nopie\$@LINKFLAGS = ${LDFLAGS} -nopie@" \
+ # Make sure the *FLAGS variables are sane.
+ # sbcl needs symbols in resulting binaries, so building with the -s linker flag will fail.
+ strip-unsupported-flags
+ filter-flags -fomit-frame-pointer -Wl,-s
+ filter-ldflags -s
+
+ # original bugs #526194, #620532
+ # this broke no-pie default builds, c.f. bug #632670
+ # Pass CFLAGS down by appending our value, to let users override
+ # the default values.
+ # Keep passing LDFLAGS down via the LINKFLAGS variable.
+ sed -e "s@\(CFLAGS += -g .*\)\$@\1 ${CFLAGS}@" \
+ -e "s@LINKFLAGS += -g\$@LINKFLAGS += ${LDFLAGS}@" \
-i src/runtime/GNUmakefile || die
sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
@@ -148,8 +156,6 @@ src_configure() {
src_compile() {
local bindir="${WORKDIR}"/sbcl-binary
- strip-unsupported-flags ; filter-flags -fomit-frame-pointer
-
if use pax_kernel ; then
# To disable PaX on hardened systems
pax-mark -mr "${bindir}"/src/runtime/sbcl