I've been working with solar to get hardened working on ppc64. We have all the appropriate changes made to the gcc ebuild to support it gcc builds fine but libstdc++-v3 errors out with the following error: if [ x"-fPIC" != x ]; then \ gcc -c -DHAVE_CONFIG_H -O2 -pipe -I. -I/var/tmp/portage/libstdc++-v3-3.3.4/wor k/gcc-3.3.4/libiberty/../include -W -Wall -Wtraditional -pedantic -fPIC /var/tm p/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c -o pic/physmem.o ; \ else true; fi /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c: In funct ion `physmem_total': /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:96: error : storage size of 'pss' isn't known /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:97: warni ng: implicit declaration of function `pstat_getstatic' /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:96: warni ng: unused variable `pss' /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c: In funct ion `physmem_available': /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:200: erro r: storage size of 'pss' isn't known /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:201: erro r: storage size of 'psd' isn't known /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:203: warn ing: implicit declaration of function `pstat_getdynamic' /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:200: warn ing: unused variable `pss' /var/tmp/portage/libstdc++-v3-3.3.4/work/gcc-3.3.4/libiberty/physmem.c:201: warn ing: unused variable `psd' make[1]: *** [physmem.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/libstdc++-v3-3.3.4/work/build/libib erty' make: *** [all-libiberty] Error 2 Reproducible: Always Steps to Reproduce: 1. Start from a 2005.0 Stage2 seed 2. Set hardened pic and pie USE flags 3. emerge -e system Portage 2.0.51.19 (default-linux/ppc64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20041102-r0, 2.6.11-hardened-r1 ppc64) ================================================================= System uname: 2.6.11-hardened-r1 ppc64 PPC970, altivec supported Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.3-r2 [2.3.3 (#1, Mar 22 2005, 05:29:50)] dev-lang/python: 2.3.3-r2 sys-devel/autoconf: [Not Present] sys-devel/automake: [Not Present] sys-devel/binutils: 2.15.91.0.1-r1 sys-devel/libtool: [Not Present] virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="ppc64 ~ppc64" AUTOCLEAN="yes" CFLAGS="-O2 -mtune=970 -mcpu=970 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" CHOST="powerpc64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mtune=970 -mcpu=970 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="altivec berkdb bitmap-fonts chroot crypt fortran gif hardened jpeg ncurses nls nptl nptlonly pam perl pic pie png ppc64 python readline spell ssl tcpd truetype truetype-fonts type1-fonts unicode zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY Note: Some of the info like glibc version come from the seed stage as the system never gets to it in the emerge -e system. Also I have verified that the problems occur on both ppc64 and ~ppc64 systems.
This bug is pretty pointless now; as said on Bug 97977 this won't compile at all w/ gcc-4.x on ppc64.