Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526194 - dev-lisp/sbcl-1.2.4 does not respect CFLAGS and LDFLAGS
Summary: dev-lisp/sbcl-1.2.4 does not respect CFLAGS and LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mark Wright
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cflags ldflags
  Show dependency tree
 
Reported: 2014-10-21 08:17 UTC by Ulrich Müller
Modified: 2015-02-01 07:39 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.xz,290.57 KB, application/octet-stream)
2014-10-21 08:21 UTC, Ulrich Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2014-10-21 08:17:41 UTC
When building things in src/runtime, neither CFLAGS nor LDFLAGS are respected. 

For example (no CFLAGS):

x86_64-pc-linux-gnu-gcc -g -Wall -Wsign-compare -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-omit-frame-pointer -I. -DSBCL_PREFIX=\"'/usr/local'\"  -c -o alloc.o alloc.c

and (no LDFLAGS):

x86_64-pc-linux-gnu-gcc -g -Wl,--export-dynamic -o sbcl alloc.o backtrace.o breakpoint.o coreparse.o dynbind.o funcall.o gc-common.o globals.o interr.o interrupt.o largefile.o monitor.o os-common.o parse.o print.o purify.o pthread-futex.o regnames.o run-program.o runtime.o safepoint.o save.o search.o thread.o time.o util.o validate.o vars.o wrap.o x86-64-arch.o linux-os.o x86-64-linux-os.o gencgc.o x86-64-assem.o ldso-stubs.o -ldl -lpthread -lz -lm

See build.log for details.
Comment 1 Ulrich Müller gentoo-dev 2014-10-21 08:21:12 UTC
Created attachment 387116 [details]
build.log
Comment 2 Mark Wright gentoo-dev 2015-01-31 04:36:06 UTC
Applied this fix for sbcl 1.2.7:

Index: sbcl-1.2.7.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-lisp/sbcl/sbcl-1.2.7.ebuild,v
retrieving revision 1.2
diff -u -B -r1.2 sbcl-1.2.7.ebuild
--- sbcl-1.2.7.ebuild   9 Jan 2015 02:03:11 -0000       1.2
+++ sbcl-1.2.7.ebuild   31 Jan 2015 04:28:26 -0000
@@ -11,10 +11,13 @@
 BV_PPC=1.2.7
 BV_SPARC=1.0.28
 BV_ALPHA=1.0.28
+BV_ARM=1.2.7
 BV_PPC_MACOS=1.0.47
 BV_X86_MACOS=1.1.6
 BV_X64_MACOS=1.1.8
+BV_SPARC_SOLARIS=1.0.23
 BV_X86_SOLARIS=1.2.7
+BV_X64_SOLARIS=1.2.7
 
 DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
 HOMEPAGE="http://sbcl.sourceforge.net/"
@@ -24,10 +27,13 @@
        ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
        sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
        alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
+       arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
        ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
        x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
        x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
-       x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )"
+       sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
+       x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
+       x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
 
 LICENSE="MIT"
 SLOT="0/${PV}"
@@ -94,6 +100,7 @@
        epatch "${FILESDIR}"/bsd-sockets-test-${PV}.patch
 
        epatch "${FILESDIR}"/${PN}-1.0.6-solaris.patch
+       epatch "${FILESDIR}"/${PN}-1.2.7-verbose-build.patch
 
        # To make the hardened compiler NOT compile with -fPIE -pie
        if gcc-specs-pie ; then
@@ -101,6 +108,14 @@
                epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
        fi
 
+       # bug #526194
+       sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+               -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+               -i src/runtime/GNUmakefile || die
+
+       sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
+               -i make-config.sh || die
+
        cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
 
        use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
cvs diff: files/sbcl-1.2.7-verbose-build.patch is a new entry, no comparison available
argus%

Fix Bug 526194 - dev-lisp/sbcl-1.2.4 does not respect CFLAGS and LDFLAGS for sbcl 1.2.7. Add arm, sparc solaris and x64 solaris binaries to SRC_URI, untested and no KEYWORDS as I do not have access to this hardware. Add sbcl-1.2.7-verbose-build.patch to echo commands executed by shell scripts during the build.
Comment 3 Mark Wright gentoo-dev 2015-02-01 07:39:49 UTC
Fixed in all versions.