I am installing a test system with GCC 4.0.0 to give it a try. During 'emerge system',pam fails to compile: gcc -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -Dlinux -pipe -fPIC -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/include -I./include -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/libpam/include -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77 -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/libpamc/include -I../pammodutil/include -DPAM_DYNAMIC -c pam_chroot.c -o dynamic/pam_chroot.o gcc -shared -L/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/lib -o pam_chroot.so dynamic/pam_chroot.o -lc -L../pammodutil -lpammodutil make[2]: Leaving directory `/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_chroot' make[2]: Entering directory `/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_console' bison -d -p _pc_yy config.y config.y: conflicts: 1 shift/reduce sh ./sed-static config.tab.c flex -Cr -oconfig.lex.c -P_pc_yy config.l sh ./sed-static config.lex.c gcc -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -Dlinux -pipe -fPIC -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/include -I./include -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/libpam/include -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77 -I/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/libpamc/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_GNU_SOURCE -DLOCKDIR=\"/var/run/console\" -I../pammodutil/include -DPAM_DYNAMIC -c pam_console.c -o dynamic/pam_console.o In file included from pam_console.c:26: ../../_pam_aconf.h:28:1: warning: "_GNU_SOURCE" redefined <command line>:1:1: warning: this is the location of the previous definition In file included from pam_console.c:493: config.tab.c:785: error: static declaration of '_pc_yyparse' follows non-static declaration config.tab.c:745: error: previous declaration of '_pc_yyparse' was here config.y: In function '_pc_yyparse': config.y:104: warning: format '%s' expects type 'char *', but argument 4 has type 'void *' config.tab.c:1224: warning: passing argument 1 of '_pc_yyerror' discards qualifiers from pointer target type config.tab.c:1342: warning: passing argument 1 of '_pc_yyerror' discards qualifiers from pointer target type make[2]: *** [dynamic/pam_console.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_console' make[1]: *** [all] Error 1 make[1]: Leaving directory `/var/tmp/portage/pam-0.77-r6/work/Linux-PAM-0.77/modules' make: *** [modules] Error 2 Reproducible: Always Steps to Reproduce: 1. Start installation process. 2. emerge GCC 4.0.0 3. bootstrap 4. emerge system Actual Results: 'emerge system' stopped at 'pam' package. Expected Results: 'emerge system' should have completed succesfully Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-4.0.0, glibc-2.3.4.20040808-r1, 2.6.11-gentoo-r3 i686) ================================================================= System uname: 2.6.11-gentoo-r3 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.5 [2.3.5 (#1, May 3 2005, 13:47:44)] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X acl acpi alsa apm arts avi berkdb bitmap-fonts chroot cjk crypt cups dvd emboss encode foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imap imlib ipv6 jpeg kde libg++ libwww mad maildir mikmod mmx motif mp3 mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl pic png python qt quicktime readline samba sdl spell sse ssh ssl svga tcpd truetype truetype-fonts type1-fonts unicode xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Can confrim this for pam-0.77-r6 and pam-0.77-r8 on amd64 - switched gcc-config => x86_64-pc-linux-gnu-4.0.0 - emerge pam same story... This problem disappears with pam-0.78, mainly the affected part has been rewritten...
Unmasking pam-0.78-r2 compiled. Since Gentoo does not oficially support GCC 4.0, this bug should be automagically fixed when the new pam ebuild is released...
GCC 4 on stable system won't be supported as it requires more fixes.