bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12762] lto produces multiple definition errors for virtual funct


From: vanboxem.ruben at gmail dot com
Subject: [Bug ld/12762] lto produces multiple definition errors for virtual function
Date: Sun, 15 May 2011 16:01:25 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12762

--- Comment #2 from vanboxem.ruben at gmail dot com 2011-05-15 16:01:04 UTC ---
Here's all the link commandline and output (taken from a Qt qmake generated
makefile):

g++ -c -std=c++0x -flto -O2 -frtti -fexceptions -mthreads -Wall 
-I"..\..\Source\test" -I"." -I"..\Qt\mkspecs\win32-g++" -o release\main.o
..\..\Source\test\main.cpp
g++ -c -std=c++0x -flto -O2 -frtti -fexceptions -mthreads -Wall 
-I"..\..\Source\test" -I"." -I"..\Qt\mkspecs\win32-g++" -o release\class.o
..\..\Source\test\class.cpp
M:\Development\x64\test>g++ -flto -Wl,-v -Wl,-s -Wl,-subsystem,console
-mthreads -o release\test.exe release/main.o release/class.o
collect2 version 4.6.1 20110515 (prerelease)(x86_64 MinGW
m:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/bin/ld.exe
-plugin
m:/development/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.6.1/liblto_plugin-0.dll
-plugin-opt=m:/development/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.6.1/lto-wrapper.exe
-plugin-opt=-fresolution=C:\Users\Ruben\AppData\Local\Temp\cccAGScb.res
-plugin-opt=-pass-through=-lmingwthrd -plugin-opt=-pass-through=-lmingw32
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex
-plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32
-plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32
-plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingwthrd
-plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname
-plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt
--sysroot=m:\development\mingw64\bin\../../mingw64 -m i386pep -Bdynamic -o
release\test.exe
m:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o
m:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/lib/../lib/crtbegin.o
-Lm:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1
-Lm:/development/mingw64/bin/../lib/gcc
-Lm:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/lib/../lib
-Lm:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../lib
-Lm:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/lib
-Lm:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../.. -v -s
-subsystem console release/main.o release/class.o -lstdc++ -lmingwthrd
-lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32
-luser32 -lkernel32 -lmingwthrd -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex
-lmsvcrt
m:/development/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/lib/../lib/crtend.o
GNU ld (GNU Binutils) 2.21.51.20110515
release/class.o (symbol from plugin):(.text+0x0): multiple definition of
`typeinfo for A'
release/main.o (symbol from plugin):(.text+0x0): first defined here
release/class.o (symbol from plugin):(.text+0x0): multiple definition of
`typeinfo name for A'
release/main.o (symbol from plugin):(.text+0x0): first defined here
release/class.o (symbol from plugin):(.text+0x0): multiple definition of
`typeinfo for B'
release/main.o (symbol from plugin):(.text+0x0): first defined here
release/class.o (symbol from plugin):(.text+0x0): multiple definition of
`typeinfo name for B'
release/main.o (symbol from plugin):(.text+0x0): first defined here
collect2: ld returned 1 exit status

-- 
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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]