http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56312
Bug #: 56312 Summary: Firefox 20.0a1 compilation with enabled LTO fails Classification: Unclassified Product: gcc Version: lto Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: marxin.li...@gmail.com Hello, I encountered following error with enabled LTO. error: /usr/bin/python2.7 /home/marxin/Programming/firefox/js/src/config/pythonpath.py -I../config /home/marxin/Programming/firefox/js/src/config/expandlibs_exec.py --depend .deps/js.pp --target js --uselist -- /home/marxin/Programming/gcc-mainline/bin/g++ -o js -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -Wno-long-long -flto -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -pthread -pipe -DNDEBUG -DTRIMMED -g -O2 -fomit-frame-pointer js.o jsoptparse.o jsheaptools.o -lpthread -flto -Wl,--build-id -Wl,-rpath-link,../../../dist/bin -Wl,-rpath-link,/home/marxin/Programming/firefox/obj-x86_64-unknown-linux-gnu/dist/lib -L../../../dist/bin -L../../../dist/lib -L/home/marxin/Programming/firefox/obj-x86_64-unknown-linux-gnu/dist/lib -lnspr4 -lplc4 -lplds4 ../editline/libeditline.a ../libjs_static.a /home/marxin/Programming/firefox/obj-x86_64-unknown-linux-gnu/modules/zlib/src/libmozz.a -Wl,--whole-archive ../../../dist/lib/libmozglue.a ../../../dist/lib/libmemory.a -Wl,--no-whole-archive -rdynamic -ldl `PushActiveVMFrame' referenced in section `.text' of /tmp/ccgCbjBe.ltrans0.ltrans.o: defined in discarded section `.text' of MethodJIT.o (symbol from plugin) `PopActiveVMFrame' referenced in section `.text' of /tmp/ccgCbjBe.ltrans0.ltrans.o: defined in discarded section `.text' of MethodJIT.o (symbol from plugin) `js_InternalThrow' referenced in section `.text' of /tmp/ccgCbjBe.ltrans0.ltrans.o: defined in discarded section `.text' of InvokeHelpers.o (symbol from plugin) `PopActiveVMFrame' referenced in section `.text' of /tmp/ccgCbjBe.ltrans0.ltrans.o: defined in discarded section `.text' of MethodJIT.o (symbol from plugin) `js_InternalInterpret' referenced in section `.text' of /tmp/ccgCbjBe.ltrans0.ltrans.o: defined in discarded section `.text' of InvokeHelpers.o (symbol from plugin) `PopActiveVMFrame' referenced in section `.text' of /tmp/ccgCbjBe.ltrans0.ltrans.o: defined in discarded section `.text' of MethodJIT.o (symbol from plugin) collect2: error: ld returned 1 exit status gcc --version: g++ (GCC) 4.8.0 20130113 (experimental) firefox: changeset: 118351:fc3ed72129d9 .mozconfig: mk_add_options MOZ_MAKE_FLAGS="-j8" ac_add_options --enable-application=browser ac_add_options --enable-optimize=-O2 export CC=/home/marxin/Programming/gcc-mainline/bin/gcc export CXX=/home/marxin/Programming/gcc-mainline/bin/g++ export CFLAGS="-flto" export CXXFLAGS="-flto" export LDFLAGS="-flto" Thank you for your help, Martin