When I emerge clisp-2.31 with -march=pentium4, it produces the following erro: ln -s ../src/dutch.lisp dutch.lisp ln -s ../src/deprecated.lisp deprecated.lisp ./lisp.run -B . -N locale -Efile UTF-8 -Eterminal UTF-8 -norc -m 750KW -x "(and (load \"init.lisp\") (sys::%saveinitmem) (ext::exit))" C_CODE_ALIGNMENT is wrong. "E = 0x806114e. Add -falign-functions=4 to CFLAGS in the Makefile. make: *** [interpreted.mem] Aborted !!! ERROR: dev-lisp/clisp-2.31 failed. !!! Function src_compile, Line 53, Exitcode 2 !!! (no error message) Emerge works with -march=pentium3 or by appending -faling-functions=4 to CFLAGS. I wrote a small patch which should fix this issue with -march=pentium4, but I don't know if it also exists with some other -march. --- clisp-2.31.ebuild 2003-11-27 00:08:32.000000000 +0200 +++ clisp-2.31-r1.ebuild 2003-11-28 18:29:41.829446680 +0200 @@ -2,6 +2,16 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/dev-lisp/clisp/clisp-2.31.ebuild,v 1.4 2003/11/26 21:57:23 mkennedy Exp $ +inherit flag-o-matic + +# Fails to compile without -falign-functions=4 when +# -march=pentium4 is defined +if [ -n "`is-flag -march=pentium4`" ]; then + if [ -z "`is-flag -falign-functions=4`" ]; then + append-flags -falign-functions=4 + fi +fi + IUSE="X threads fastcgi postgres ldap nls" DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp" Reproducible: Always Steps to Reproduce: 1. Put -march=pentium4 to CFLAGS 2. Make sure there is no -faling-functions=4 in CFLAGS 3. Emerge clisp-2.31 Gentoo Base System version 1.4.3.10p1 Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0-test10) ================================================================= System uname: 2.6.0-test10 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://ds.thn.htu.se/linux/gentoo http://mirror.pudas.net/gentoo ftp://mirror.pudas.net/gentoo http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo/ ftp://sunsite.cnlab-switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage" USE="x86 oss avi crypt encode gif jpeg mikmod mpeg ncurses nls pdflib png quicktime truetype xml2 xmms xv zlib directfb gtkhtml alsa slang readline aalib bonobo svga ggi java ruby mysql X sdl gpm tcpd pam libwww ssl perl python imlib gnome gtk qt kde motif opengl mozilla gphoto2 cdr acpi apache2 cscope curl dga dnd doc -faad fbcon fbdev gb gd gstreamer gtk2 icc icc-pgo imagemagick imap ipv6 jikes ladcca mad oggvorbis moznoirc moznomail mpi nocardbus nptl oav odbc offensive openal php plotutils radeon samba snmp sse tiff usb wmf wxwindows xinerama xml xvid -cups -foomaticdb -libg++ -spell -gdbm -berkdb -arts -tetex -tcltk -guile -esd -apm"
-r1 committed to cvs should fix this. thanks for the bug report. matt
Not fixed at all. ./lisp.run -B . -N locale -Efile UTF-8 -Eterminal UTF-8 -norc -m 750KW -x "(and (load \"init.lisp\") (sys::%saveinitmem) (ext::exit))" C_CODE_ALIGNMENT is wrong. &EVAL-WHEN = 0x8062b7b. Add -falign-functions=4 to CFLAGS in the Makefile. make: *** [interpreted.mem] Abandon !!! ERROR: dev-lisp/clisp-2.31-r1 failed. !!! Function src_compile, Line 73, Exitcode 2 !!! (no error message) With CFLAGS="-mcpu=athlon-xp -O3 -pipe".
I tested some CFLAGS combinations: USE="X nls" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" CFLAGS="-march=pentium4 -O3 -pipe" CFLAGS="-mcpu=pentium4 -O3 -pipe -fomit-frame-pointer" CFLAGS="-mcpu=pentium4 -O3 -pipe" Same error as -march=pentium4. USE="X nls" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" CFLAGS="-mcpu=athlon-xp -O3 -pipe" Compiles. USE="X threads nls" CFLAGS="-mcpu=athlon-xp -O3 -pipe" Compiles. gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice)
The ebuild does not currently handle the case where -falign-functions is explicitly set to a value other than 4. (e.g. 64, on some of my machines) I don't know how to replace a variable CFLAG using flag-o-matic - appending '-falign-functions=4' to CFLAGS will work but is ugly; suggest the following: --- clisp-2.31-r1.ebuild 2003-12-02 08:19:46.000000000 +0000 +++ clisp-2.31-r2.ebuild 2003-12-02 08:48:42.000000000 +0000 @@ -13,6 +13,12 @@ && ! is-flag '-falign-functions=4'; then append-flags '-falign-functions=4' fi +if ! is-flag '-falign-functions=4' + && expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)'; then + CFLAGS=${CFLAGS/\ +$(expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)')/\ +-falign-functions=4} +fi # Athlon XP users report problems with -O3 optimization. In this # block, we remove any optimization flag. Depending on bug 34497. we
Please try clisp-2.33.2. Starting with clisp-2.33-r3, the ebuild unsets any CFLAGS you may have chosen in /etc/make.conf. I simply don't have the time to maintain all the logic required to filter CFLAGS. CLISP provides its own optimizations settings.