http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47390
Summary: Linking with -export-dynamic broken Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver AssignedTo: unassig...@gcc.gnu.org ReportedBy: dirtye...@gentoo.org When building gawk, -export-dynamic is added to LDFLAGS. It seems current trunk treats options starting with "-e" differently that previous versions. With 4.6 I get: x86_64-unknown-linux-gnu-gcc -O2 -march=native -g -pipe -export-dynamic -o gawk array.o awkgram.o builtin.o dfa.o ext.o field.o floatcomp.o gawkmisc.o getopt.o getopt1.o io.o main.o msg.o node.o random.o re.o regex.o replace.o version.o eval.o profile.o -ldl -lm -lm /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: cannot find entry symbol xport-dynamic; defaulting to 00000000004034c0 This leads to a broken gawk: $ gawk -V (null): fatal: spec_setup: cp: can't allocate 2109862218 bytes of memory (Success) It could be that this is intentional and something like -Wl,-export-dynamic should be used, but this mail indicates differently: http://osdir.com/ml/bug-gnu-utils-gnu/2010-10/msg00002.html If it is intentional, it should be documented in release notes so we have something to point upstreams at. $ gcc-4.6.0-pre9999 -v Using built-in specs. COLLECT_GCC=gcc-4.6.0-pre9999 COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.6.0_pre9999/work/gcc-4.6.0-9999/configure --prefix=/usr --bindir=/usr/x86_64-unknown-linux-gnu/gcc-bin/4.6.0-pre9999 --includedir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/include --datadir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999 --mandir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999/man --infodir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/include/g++-v4 --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --disable-ppl-version-check --with-cloog-include=/usr/include/cloog-ppl --enable-lto --disable-nls --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --disable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,go --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo SVN' Thread model: posix gcc version 4.6.0-pre9999 20110121 (experimental) rev. 169076 (Gentoo SVN) $ ld -v GNU ld (GNU Binutils) 2.21