I added the -fstack-protector flag to CFLAGS and did an emerge --emptytree --world All packages recompiled succesfully, except this one. Now, even if I remove -fstack-protector from CFLAGS, it still fails as follows: gcc -std=c99 -m32 -shared -o libxpcom.so libxpcom-libxpcom.o libxpcom-debug.o -Wl,--soname,libxpcom.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/32/libsupc++.a(cp-demangle.o): In function `d_demangle': : undefined reference to `__stack_chk_fail_local' collect2: ld returned 1 exit status make: *** [npviewer.bin] Error 1 rm lsb-build-i386/libXext.o lsb-build-i386/libgcc_s.o lsb-build-i386/libpthread.o lsb-build-i386/libdl.o lsb-build-i386/libgobject-2.0.o lsb-build-i386/libgthread-2.0.o lsb-build-i386/libgdk-x11-2.0.o lsb-build-i386/libgtk-x11-2.0.o lsb-build-i386/libX11.o lsb-build-i386/libXt.o lsb-build-i386/libglib-2.0.o lsb-build-i386/libc_nonshared.o lsb-build-i386/libc_main.o !!! ERROR: net-www/nspluginwrapper-0.9.91.4 failed. Call stack: ebuild.sh, line 1615: Called dyn_compile ebuild.sh, line 972: Called qa_call 'src_compile' ebuild.sh, line 44: Called src_compile nspluginwrapper-0.9.91.4.ebuild, line 28: Called die Reproducible: Always 6.21.3 x86_64) ================================================================= System uname: 2.6.21.3 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz Gentoo Base System release 1.12.9 Timestamp of tree: Thu, 14 Jun 2007 00:20:01 +0000 dev-java/java-config: 1.3.7, 2.0.32 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer -fstack-protector" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict userfetch userpriv" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/linux/gentoo http://distfiles.gentoo.org" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.pearlgates.net/gentoo-portage" USE="X acpi alsa amd64 berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gstreamer gtk hal iconv isdnlog java jpeg kerberos libg++ mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv zlib" ALSA_CARDS="intel_hda" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fglrx vesa vga" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Remove -fstack-protector from your C[XX]FLAGS and use a proper hardened profile.