When hardened-gcc is enabled, the produced gcl binary will not work. Thus, the build fails at this point: | ./raw_gcl ./ -libdir /var/tmp/portage/gcl-2.5.3/work/gcl-2.5.3/ < foo | GCL (GNU Common Lisp) April 1994 32768 pages | | Unrecoverable error: Segmentation violation.. | make[1]: *** [saved_gcl] Error 134 (I'll attach the complete build log, just in case.) When building with hardened-gcc disabled, gcl builds fine. Reproducible: Always Steps to Reproduce: 1. hcc -a 2. emerge gcl 3. watch it fail Portage 2.0.49-r15 (selinux-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.21-hardened) ================================================================= System uname: 2.4.21-hardened i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.3.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon -O3 -fomit-frame-pointer -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon -O3 -fomit-frame-pointer -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache autoaddcvs sfperms sandbox userpriv notitles strict" GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://gentoo.inode.at/source/ http://gentoo.inode.at/" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 crypt ncurses selinux zlib gdbm berkdb readline guile pam libwww ssl perl opengl mozilla altcolors curl dga doc dvd emacs ethereal leim mbox moznocompose moznoirc moznomail moznoxft rage128 Xaw3d -arts -cups -gpm -java -kde -motif -nls -qt -svga -xmms -tcpd -python -esd spell -slang X png gtk gif tiff mmx xml xml2 truetype oss tetex jpeg avi oggvobis encode python plotutils pdflib"
Created attachment 21139 [details] shows how emerge fails to build gcl with hardened-gcc
common-lisp@gentoo.org isn't valid.
this is best assigned to the gentoo-hardened team
can you try hardened-gcc -a and edit the ebuild to resemble CC="gcc -yet_exec -yno_propolice" or CFLAGS="-yet_exec -yno_propolice" for lisp to be built? TIA, Alex
screen fun here too cp ../o/gcllib.a libgclp.a cp init_gcl.lsp.in init_gcl.lsp.tmp cat init_gcl.lsp.tmp | sed \ -e "s,@LI-VERS@,(`cat ../majvers`.`cat ../minvers`) `date`,1" \ -e "s,@LI-MINVERS@,`cat ../minvers`,1" \ -e "s,@LI-MAJVERS@,`cat ../majvers`,1" \ -e "s,@LI-CC@,\"gcc -c -Wall -DVOL=volatile -fsigned-char -fwritable-strings -pipe\",1" \ -e "s,@LI-LD@,\"gcc -o \",1" \ -e "s,@LI-LD-LIBS@,\" -lgcl -lm /var/tmp/portage/gcl-2.5.3/work/gcl-2.5.3/binutils/bfd/libbfd.a /var/tmp/portage/gcl-2.5.3/work/gcl-2.5.3/binutils/libiberty/libiberty.a -lreadline -lncurses -lc -lgclp\",1" \ -e "s,@LI-OPT-THREE@,\"-O6 -fomit-frame-pointer\",1" \ -e "s,@LI-OPT-TWO@,\"-O\",1" \ -e "s,@LI-INIT-LSP@,\"init_gcl.lsp\",1" >init_gcl.lsp cp ../lsp/auto.lsp ../lsp/auto_new.lsp [ "readline.o" = "" ] || \ echo "(AUTOLOAD 'init-readline '|readline|)" >>../lsp/auto_new.lsp gcc -o raw_gcl \ -L. -lgcl -lm /var/tmp/portage/gcl-2.5.3/work/gcl-2.5.3/binutils/bfd/libbfd.a /var/tmp/portage/gcl-2.5.3/work/gcl-2.5.3/binutils/libiberty/libiberty.a -lreadline -lncurses -lc -lgclp cp init_gcl.lsp foo echo " (in-package \"USER\")(system:save-system \"saved_gcl\")" >>foo ./raw_gcl ./ -libdir /var/tmp/portage/gcl-2.5.3/work/gcl-2.5.3/ < foo GCL (GNU Common Lisp) April 1994 32768 pages Unrecoverable error: NULL_OR_ON_C_STACK macro invalid. make[1]: *** [saved_gcl] Error 134 rm init_gcl.lsp.tmp raw_gcl make[1]: Leaving directory `/var/tmp/portage/gcl-2.5.3/work/gcl-2.5.3/unixport' make: *** [unixport/saved_gcl] Error 2 !!! ERROR: dev-lisp/gcl-2.5.3 failed. !!! Function src_compile, Line 41, Exitcode 2 !!! (no error message) i think this ebuild qualifies for gcc -yet_exec -yno_propolice just like the haskell compiler did some weeks ago - you knever know ;-) i will edit the corresponding ebuilds when cvs is back in the game, cya, Alex
in the meantime you may try this one: 00:26:58 [/usr/local/chroots/chroot001:3254.pty-s4.epoch] epoch ~ # CC="${CC:=gcc} -yet_exec -yno_propolice" emerge -v gcl
I have talked to the GCL developers about this, and this is a known problem: Camm Maguire <camm@enhanced.com> wrote: > While I do not have time right now to search for a solution myself, > if you can discover a simple one and explain it clearly to me, I'll > try to get it into GCL. I managed to compile GCL manually, but it was really ugly, because the intermediate compiler needs to be chpax'ed in order for the build to succeed. I really have no idea how to turn that into an ebuild. Sorry.
>>> original instance of package unmerged safely. >>> Regenerating /etc/ld.so.cache... * Caching service dependencies... [ ok ] >>> dev-lisp/gcl-2.5.3 merged. >>> clean: No packages selected for removal. >>> Regenerating /etc/ld.so.cache... * Caching service dependencies... [ ok ] >>> Auto-cleaning packages ... >>> No outdated packages were found on your system. * Regenerating GNU info directory index... * Processed 77 info files. 19:32:28 [/usr/local/chroots/chroot001:5925.pty-s0.epoch] epoch ~ # hcc -l glibc: GNU C Library stable release version 2.3.2, by Roland McGrath et al. glibc: Compiled by GNU CC version 3.3.2 20031022 (Gentoo Linux 3.3.2-r3, propolice). gcc: gcc version 3.3.2 20031022 (Gentoo Linux 3.3.2-r3, propolice) ld: GNU ld version 2.14.90.0.7 20031029 config: hcc-3.3.2.0-x86 - /etc/hcc.conf *cpp: %{posix:-D_POSIX_SOURCE} %{!D__KERNEL__: %{!DIN_GCC: %{!static: %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: %{pie|yet_dyn: %{!nopie: %{!yet_exec: -D__PIC__ -D__pic__ -DPIC -Dpic}}} } } } } } } } %{pthread:-D_REENTRANT} -- *cc1: %(cc1_cpu) %{!D__KERNEL__: %{!DIN_GCC: %{!static: %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: %{pie|yet_dyn: %{!nopie: %{!yet_exec: -fPIC -fpie}}} %{fstack-protector|fstack-protector-all: -fforce-addr} } } } } } } } %{profile:-p} -- *endfile: %{static|yet_exec|D__KERNEL__|DIN_GCC: crtend.o%s} %{!static: %{!yet_exec: %{!D__KERNEL__: %{!DIN_GCC: crtendS.o%s}}}} crtn.o%s -- *link: %{!static:--eh-frame-hdr} -m elf_i386 %{shared:-shared} %{!shared: %{!ibcs: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} %{static:-static}}} %{!D__KERNEL__: %{!DIN_GCC: %{!static: %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: %{!shared: %{!Bshareable: %{!i: %{!r: %{pie|yet_dyn: %{!nopie: %{!yet_exec: -pie -z combreloc}}} } } } } } } } } } } } -- *startfile: %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:%{profile:gcrt1.o%s} %{!profile: %{static|yet_exec|D__KERNEL__|DIN_GCC: crt1.o%s} %{!static: %{!yet_exec: %{!D__KERNEL__: %{!DIN_GCC: Scrt1.o%s}}}} }}}} crti.o%s %{static:crtbeginT.o%s} %{!static: %{yet_exec|D__KERNEL__|DIN_GCC: crtbegin.o%s} %{!yet_exec: %{!D__KERNEL__: %{!DIN_GCC: crtbeginS.o%s}}} } works here, can you report back?