http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51832

--- Comment #16 from Markus Trippelsdorf <markus at trippelsdorf dot de> 
2012-01-19 17:54:43 UTC ---
I've just checked my Fedora 15 image in KVM.
Here ld.bfd is fine and only ld.gold fails:

$ ld -v
GNU ld version 2.21.51.0.6-6.fc15 20110118
$ /home/markus/gcc/usr/local/bin/g++ test.ii test2.ii -flto -std=gnu++0x
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status

$ sudo ln -f /usr/bin/ld.gold /usr/bin/ld
$ ld -v
GNU gold (version 2.21.51.0.6-6.fc15 20110118) 1.10

$ /home/markus/gcc/usr/local/bin/g++ test.ii test2.ii -flto -std=gnu++0x
/usr/bin/ld: error: /tmp/ccOfbqWY.o: multiple definition of
'_ZNSt16allocator_traitsISaIP10ElfSegmentEE18__construct_helperIS1_JRKS1_EE5valueE'
/usr/bin/ld: /tmp/ccQ2J7XR.o: previous definition here
/usr/bin/ld: /usr/lib/../lib64/crt1.o:(.text+0x20): error: undefined reference
to 'main'
collect2: error: ld returned 1 exit status

Reply via email to