http://sourceware.org/bugzilla/show_bug.cgi?id=12557
Summary: Firefox fails to build with -flto and --as-needed LDFLAGS Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassig...@sources.redhat.com ReportedBy: cryptooctopl...@gmail.com Please see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375#c53 Firefox 4 fails to build with the following flags: CXXFLAGS="-march=native -fpermissive -flto=4 -fuse-linker-plugin -fwhole-program" LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory" c++ -o xpcshell -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -march=native -fpermissive -flto=4 -fuse-linker-plugin -fwhole-program -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O3 xpcshell.o -lpthread -Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory -Wl,-rpath-link,/var/tmp/mozilla-central/moz-build-dir/dist/bin -Wl,-rpath-link,/usr/lib -L../../../../dist/bin -L../../../../dist/lib ../../../../dist/lib/libxpcomglue_s.a -L/var/tmp/mozilla-central/moz-build-dir/dist/bin -lxpcom -lmozalloc -lxul -L/var/tmp/mozilla-central/moz-build-dir/dist/bin -lxpcom -lmozalloc -lxul -Wl,-R/usr/lib64 -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl ../../../../dist/bin/libxul.so: undefined reference to `PR_smprintf_free' ../../../../dist/bin/libxul.so: undefined reference to `PR_SetEnv' ../../../../dist/bin/libxul.so: undefined reference to `PR_Now' ../../../../dist/bin/libxul.so: undefined reference to `PR_GetErrorText' ../../../../dist/bin/libxul.so: undefined reference to `PR_FindFunctionSymbol' ../../../../dist/bin/libxul.so: undefined reference to `PR_PushIOLayer' ../../../../dist/bin/libxul.so: undefined reference to `PR_ntohs' ../../../../dist/bin/libxul.so: undefined reference to `PR_FormatTimeUSEnglish' ../../../../dist/bin/libxul.so: undefined reference to `PR_MemMap' ../../../../dist/bin/libxul.so: undefined reference to `PR_LocalTimeParameters' ../../../../dist/bin/libxul.so: undefined reference to `PR_GetDefaultIOMethods' ../../../../dist/bin/libxul.so: undefined reference to `PR_ReadDir' ../../../../dist/bin/libxul.so: undefined reference to `PR_SetPollableEvent' ../../../../dist/bin/libxul.so: undefined reference to `PR_FindSymbol' /usr/lib/libssl3.so: undefined reference to `PR_OpenAnonFileMap' /usr/lib/libssl3.so: undefined reference to `PR_ExportFileMapAsString' ../../../../dist/bin/libxul.so: undefined reference to `PR_Delete' ../../../../dist/bin/libxul.so: undefined reference to `PR_AtomicSet' /usr/lib/libnss3.so: undefined reference to `PR_NewRWLock' ../../../../dist/bin/libxul.so: undefined reference to `PR_SetNetAddr' ... It builds fine without the "--as-needed" LDFLAG. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils