make[1]: Entering directory `/var/tmp/portage/proftpd-1.2.8/work/proftpd-1.2.8/lib/libcap' => making cap_names.c from <linux/capability.h> gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wall -Llib -lresolv _makenames.c -o _makenames ./_makenames > cap_names.h gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wall -c cap_alloc.c -o cap_alloc.o gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wall -c cap_proc.c -o cap_proc.o gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wall -c cap_extint.c -o cap_extint.o gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wall -c cap_flag.c -o cap_flag.o gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wall -c cap_text.c -o cap_text.o gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wall -c cap_sys.c -o cap_sys.o cap_sys.c: In function `capget': cap_sys.c:16: can't find a register in class `BREG' while reloading `asm' make[1]: *** [cap_sys.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/proftpd-1.2.8/work/proftpd-1.2.8/lib/libcap' make: *** [dirs] Error 2 !!! ERROR: net-ftp/proftpd-1.2.8 failed. !!! Function src_compile, Line 68, Exitcode 2 !!! compile problem Reproducible: Always Steps to Reproduce: 1.emerge proftpd Actual Results: failed to compile Expected Results: should compile normally Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r1) ================================================================= System uname: 2.5.67 i686 AMD Duron(tm) processor GENTOO_MIRRORS="ftp://ftp.gentoo.linux.no/pub/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo" 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/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss apm avi crypt cups encode gif jpeg kde libg++ mikmod mpeg nls pdflib png quicktime truetype xml2 xmms xv zlib gtkhtml gdbm berkdb slang readline arts bonobo tcltk guile X sdl gpm tcpd pam libwww ssl python imlib oggvorbis gtk qt motif opengl -svga -spell 3dnow apache2 cdr cjk dvd esd flash gnome gtk2 imap ipv6 java lcms ldap maildir mbox mmx mozilla mysql ncurses perl postgres ruby samba sasl ssetcltk tetex tiff" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -fPIC -Wno-deprecated" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
turn down your CFLAGS if you find out which flag it breaks we could filter it out
Forums thread http://forums.gentoo.org/viewtopic.php?t=74599 shows proftp doesn't compile with -mcpu=athlon-mp -O3 -pipe -fomit-frame-pointer -fPIC which led me to suspect -fPIC is the likely culprit. I tested proftpd-1.2.8 with the -fPIC flag and indeed it failed: gcc -march=pentium4 -O3 -pipe -fomit-frame-pointer -fPIC -Wall -c cap_sys.c -o cap_sys.o cap_sys.c: In function `capget': cap_sys.c:16: can't find a register in class `BREG' while reloading `asm' make[1]: *** [cap_sys.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/proftpd-1.2.8/work/proftpd-1.2.8/lib/libcap' make: *** [dirs] Error 2 !!! ERROR: net-ftp/proftpd-1.2.8 failed. !!! Function src_compile, Line 69, Exitcode 2 !!! compile problem Without the -fPIC flag it compiles ok: gcc -march=pentium4 -O3 -pipe -fomit-frame-pointer -Wall -c cap_sys.c -o cap_sys.o ar rcu libcap.a cap_alloc.o cap_proc.o cap_extint.o cap_flag.o cap_text.o cap_sys.o make[1]: Leaving directory `/var/tmp/portage/proftpd-1.2.8/work/proftpd-1.2.8/lib/libcap' So it looks like this is a duplicate of http://bugs.gentoo.org/show_bug.cgi?id=20798.
For the sake of completeness proftpd compiles ok with all non-athlon flags Veiko used except -fPIC: gcc -march=pentium4 -O3 -pipe -fomit-frame-pointer -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -Wall -c cap_sys.c -o cap_sys.o ar rcu libcap.a cap_alloc.o cap_proc.o cap_extint.o cap_flag.o cap_text.o cap_sys.o make[1]: Leaving directory `/var/tmp/portage/proftpd-1.2.8/work/proftpd-1.2.8/lib/libcap'