commit 11213f32590391bf2ad762043de8605ef1304d52 Author: Mihai Moldovan Date: Thu Oct 5 00:36:32 2017 +0200 dev-lisp/sbcl-1.4.0: pass down CFLAGS and LDFLAGS in a saner way, respecting default values. Since sbcl uses no-pie builds by default, we should let the build system handle the complexity and only append our {C,LD}FLAGS values. Just overriding them unconditionally in all places will create a big mess. diff --git a/dev-lisp/sbcl/sbcl-1.4.0.ebuild b/dev-lisp/sbcl/sbcl-1.4.0.ebuild index 9f565e6..ebbceb4 100644 --- a/dev-lisp/sbcl/sbcl-1.4.0.ebuild +++ b/dev-lisp/sbcl/sbcl-1.4.0.ebuild @@ -107,11 +107,13 @@ 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@" \ + # 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\"@" \