The Emacs ebuild, or a makefile therein, seems to pass LDFLAG directly to the ld binary, and because LDFLAGs are to be formatted for gcc (with -Wl,parameter to specify that it's a linker flag), an "unrecognized option" error is given by ld causing the emerge to die. I also have, on the forums, partial record of this bug in October 2004, seen in the URL given. I can of course work around this issue by commenting the LDFLAG line of make.conf or running LDFLAG="" emerge emacs; however, emacs will break chains of emerges such as `emerge -uD world` if LDFLAGs are set to user preference, and this is certainly bad. Also, I've tried the emerge with the USEFLAGs attached for `emerge info`, and as `USE="-*" emerge emacs`, both of which failed. I hope this bug does not exist in Emacs 21.4, or tonight's upgrades will fail ;) Reproducible: Always Steps to Reproduce: 1. Set LDFLAGs to a gcc-passed linker-flag format like "-Wl,-O1" 2. emerge =app-editors/emacs-21.3-r3 Actual Results: gcc -nostdlib `./prefix-args -Xlinker -z nocombreloc -Wl,-O1 -Wl,-z,combreloc -Wl,--enable-new-dtags -Wl,--sort-common` -o temacs pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o charset.o coding.o category.o ccl.o cm.o term.o xfaces.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o print.o lread.o abbrev.o syntax.o unexelf.o mocklisp.o bytecode.o process.o callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o textprop.o composite.o md5.o terminfo.o lastfile.o vm-limit.o -lncurses -lm -lgcc -lc -lgcc /usr/lib/crtn.o /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '-Wl,-O1' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status make[1]: *** [temacs] Error 1 # emerge info Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.11-rc2-nitro0 i686) ================================================================= System uname: 2.6.11-rc2-nitro0 i686 Celeron (Coppermine) Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4 [2.3.4 (#2, Jan 26 2005, 21:38:44)] ccache version 2.3 [enabled] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-Os -march=pentium2 -fomit-frame-pointer -pipe" CHOST="i686-pc-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 /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-Os -march=pentium2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://gentoo.binarycompass.org ftp://sunsite.ualberta.ca/pub/unix/Linux/gentoo/" LDFLAGS="-Wl,-O1 -Wl,-z,combreloc -Wl,--enable-new-dtags -Wl,--sort-common" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage USE="X aac aalib acl acpi aim alsa apache2 apm audiofile avi bcmath berkdb bidi bitmap-fonts bzlib calendar canna cdr cjk clamav cpdflib crypt cscope ctype cups dga dillo directfb divx4linux dnd doc dvd dvdr emacs emacs-w3 encode ethereal evo f77 fam fbcon fftw flac flash font-server foomaticdb fortran freewnn ftp gcj gdbm gif gimpprint gmp gnome gpm gtk gtk2 guile icc icq imagemagick imlib innodb ipv6 jabber java javascript jikes joystick jpeg junit kde kdexdeltas kerberos latex lcms leim libcaca libclamav libg++ libwww lua lzo mad matroska mcal mikmod mime ming mmx mng motif mozilla moznomail mozsvg mp3 mpeg msn mule multitarget mysql nas ncurses netboot nethack network nls nptl objc ogg oggvorbis openal opengl oss pam pcre pda pdflib perl php pie plotutils png posix postgres prelude python qt quicktime quotas readline ruby samba sdl server slang sndfile snmp sockets speex spell spl sqlite ssl stroke svg svga szip tcltk tcpd tetex tga theora tiff timidity tokenizer truetype truetype-fonts type1-fonts unicode usb wmf wxwindows x86 xanim xemacs xface xine xml xml2 xmms xosd xpm xv xvid zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, PORTDIR_OVERLAY
*** This bug has been marked as a duplicate of 77430 ***