[LLVMdev] mingw build problems
Jay Foad
jay.foad at gmail.com
Fri Apr 17 08:45:57 PDT 2009
The next problem I have is:
llvm[2]: Linking Debug executable llc
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libstdc++.a(stubs.o):(.text+0x160):
multiple definition of `_powf'
/home/foad/llvm/objdir-mingw/Debug/lib/libLLVMCodeGen.a(RegAllocLinearScan.o):/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:576:
first defined here
collect2: ld returned 1 exit status
math.h:576 says:
__CRT_INLINE float __cdecl powf (float x, float y)
{return (float) pow (x, y);}
The definition of _powf in RegAllocLinearScan.o seems to be marked
with some LINK_ONCE_DISCARD and COMDAT stuff, so I assume multiple
such definitions shouldn't cause linker errors.
I don't know what libstdc++'s stubs.o is for. If I create a bodged
version of libstdc++ that doesn't include stubs.o, then llc links
successfully!
I've tried coming up with a small C++ app that gives the same linker
error, but so far without success.
Can anyone help?
Thanks,
Jay.
More information about the llvm-dev
mailing list