When emerging courier-authlib with the mysql USE flag set, it fails with ld: unrecognized option '-Wl' Reproducible: Always Steps to Reproduce: 1. USE="mysql" emerge =net-libs/courier-authlib-0.55 Actual Results: Linking libcourierauth.la config.status: creating authlib.3 config.status: executing depfiles commands Linking libcourierauthsasl.la Linking libcourierauthsaslclient.la Linking libcourierauthcommon.la Linking courierauthconfig Linking authmksock Linking authtest Linking authenumerate Linking libauthuserdb.la Linking libauthpam.la Linking libauthshadow.la Linking libauthmysql.la Linking libauthcustom.la /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '-Wl' /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status make[2]: *** [libauthmysql.la] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make: *** [all] Error 2 I have tried with and without LDFLAGS being set, and I still get the same error. I cannot see where else these flags may be set. I have also tried with both GCC 3.4.4 and GCC 3.4.3-20050110-r2 I have tried Googling for a solution - the best help I can get is that it gcc should strip the Wl flag before passing control to ld which is why it fails, as it does not understand the flag. I don't know enough to say if this is the case or not. Expected Results: libauthmysql.la should have linked correctly, and the emerge should have completed. emerge info: Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r4 i686) ================================================================= System uname: 2.6.12-gentoo-r4 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -funit-at-a-time" 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.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -funit-at-a-time" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg ccache clean confcache distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://cudlug.cudenver.edu/gentoo/ http://adelie.polymtl.ca/ http://mirror.datapipe.net/gentoo http://modzer0.cs.uaf.edu/public/gentoo/" LANG="en_NZ" LDFLAGS="-Wl,-z,now" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/personal /usr/local/portage/gentoo.de /usr/local/portage/breakmygentoo" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex X alsa berkdb cairo crypt cups dvd foomaticdb gdbm gif glitz gnome gpm gtk gtk2 imap ipv6 java jpeg libwww maildir mmx mmxext mysql ncurses nls nptl opengl pam png ppds python readline samba sasl spell sse ssl svga tiff truetype unicode usb xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL, LINGUAS
*** This bug has been marked as a duplicate of 88415 ***