I use gcc-4.4.3 as my default gcc version. With this version, the option --no-export-dynamic is changed to --export-dynamic. Using --no-export-dynamic makes the linker unhappy and he quits. x86_64-pc-linux-gnu-gcc -march=athlon64 -msse3 -O3 -pipe -fomit-frame-pointer -march=athlon64 -msse3 -O3 -pipe -fomit-frame-pointer -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -march=athlon64 -msse3 -O3 -pipe -fomit-frame-pointer -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -march=athlon64 -msse3 -O3 -pipe -fomit-frame-pointer -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -L./libdm -L./lib -L./daemons/dmeventd -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -L../libdm -L../lib -L../daemons/dmeventd -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -L../../libdm -L../../lib -L../../daemons/dmeventd -Wl,--no-export-dynamic -static -L. -L../../libdm/ioctl -o dmeventd.static \ dmeventd.o -ldl -ldevmapper-event -lpthread -lm -ldevmapper -ludev /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: unrecognized option '--no-export-dynamic' /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status Reproducible: Always Steps to Reproduce: 1. emerge --sync 2. emerge -Nuv lvm2 3. Actual Results: lvm2 fails to build with gcc-4.4.3 Expected Results: lvm2 builds correctly with gcc-4.4.3
Nope, you have too old binutils. Use 2.20 or higher, it's stable. # binutils-config -l [1] x86_64-pc-linux-gnu-2.20.1 * # ld -v GNU ld (GNU Binutils) 2.20.1.20100303 *** This bug has been marked as a duplicate of bug 332905 ***
Given that there are two bugs with the same complaint (this and bug 333565) perhaps the lvm2 ebuild should be modified to require >=sys-devel/binutils-2.20 or something similar?