http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48947
Summary: 4.6.0 fails to link ffmpeg with LTO and gold Product: gcc Version: lto Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: gmark...@gmail.com I am trying to make ffmpeg snapshot. I configure ffmpeg with the following line: ../configure --enable-shared --cc='gcc -flto -fuse-linker-plugin -fPIC' --prefix=/home/markhor/ffmpeg/install --arch=x86_64 It fails to build with LD libavcodec/libavcodec.so.53 ffmpeg/libavcodec/jpegls.h:46:0: warning: type of ‘ff_log2_run’ does not match original declaration [enabled by default] ffmpeg/libavcodec/jpegls.h:46:0: warning: type of ‘ff_log2_run’ does not match original declaration [enabled by default] ffmpeg/libavcodec/bitstream.c:35:15: note: previously declared here x86_64-unknown-linux-gnu/bin/ld.gold: error: /tmp/ccla9ktI.ltrans3.ltrans.o: requires dynamic reloc which may overflow at runtime; recompile with -fPIC x86_64-unknown-linux-gnu/bin/ld.gold: error: /tmp/ccla9ktI.ltrans10.ltrans.o: requires dynamic reloc which may overflow at runtime; recompile with -fPIC x86_64-unknown-linux-gnu/bin/ld.gold: error: /tmp/ccla9ktI.ltrans16.ltrans.o: requires dynamic reloc which may overflow at runtime; recompile with -fPIC x86_64-unknown-linux-gnu/bin/ld.gold: error: /tmp/ccla9ktI.ltrans21.ltrans.o: requires dynamic reloc which may overflow at runtime; recompile with -fPIC collect2: ld returned 1 exit status --cc='gcc -flto -fPIC' fails the same way. Snapshot is successfully built without LTO with the BFD linker.