[llvm-dev] Error cross building LLVM for MinGW
Tony Kelman via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 18 21:51:48 PST 2016
Richard Pennington via llvm-dev <llvm-dev <at> lists.llvm.org> writes:
> Hi Tony,
>
> I googled around a little bit and found this bug:
> https://llvm.org/bugs/show_bug.cgi?id=9744
> The generated code is somewhat different, but the little test case fails
> for me in exactly the same way:
I can reproduce actually. Does your ecc++ driver default to trying to
link libstdc++ statically? Using the kinda-old x86_64-w64-mingw32-clang++
3.5.1 that was recently added to Cygwin I get the same, but only when I
try to build with -static-libstdc++. (-fno-exceptions wouldn't be needed
with a more recent clang, I think)
$ x86_64-w64-mingw32-clang++ -fno-exceptions -static-libstdc++ test.cpp
/usr/lib/gcc/x86_64-w64-mingw32/4.9.2/libstdc++.a(string-inst.o): In
function `std::basic_string<char, std::char_traits<char>,
std::allocator<char> > std::operator+<char, std::char_traits<char>,
std::allocator<char> >(char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
/usr/src/debug/mingw64-x86_64-gcc-4.9.2-2/x86_64-w64-mingw32/libstdc++-v3/
include/bits/basic_string.tcc:692:
multiple definition of `std::basic_string<char, std::char_traits<char>,
std::allocator<char> > std::operator+<char, std::char_traits<char>,
std::allocator<char> >(char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
/tmp/test-7b9696.o:(.text[_ZStplIcSt11char_traitsIcESaIcEESbIT_
T0_T1_EPKS3_RKS6_]+0x0):
first defined here
collect2: error: ld returned 1 exit status
x86_64-w64-mingw32-clang: error: linker (via gcc) command failed with exit
code 1 (use -v to see invocation)
More information about the llvm-dev
mailing list