[LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"

Ruben Van Boxem vanboxem.ruben at gmail.com
Tue Aug 23 03:15:49 PDT 2011


2011/8/23 NAKAMURA Takumi <geek4civic at gmail.com>:
> Ruben,
>
> Your failure must be due to --disable-pthreads.

Ah yes, I used the same build script as I did for my native Windows
cross-compiled builds, silly me.

> lib/Support/Unix/Mutex.inc does not have "acquire()".
> (Shall we fix it?)

Does it really make sense to disable pthreads for Linux-hosted LLVM?
I.e. does it deserve fixing?

>
> It might be a bug, though, --disable-pthreads would not make sense to
> your configuration.
> --enable-pthreads affects host platform.

Yeah, silly me, my mistake.
>
> Note, LLVM and Clang have multi-target architecture. --target is
> understood as "default target".

Yeah, I know, and find that incredibly cool. Although to create a
decent toolchain package, you'd need all the include/lib paths set up
correctly, and have all system headers and libs available, and for
now, still have a gcc executable to be able to link. If the latter one
is fixed, I'd consider experimenting with building Linux stuff on
Windows through Clang a bit more.

> (EE/JIT should take the host triplet then. Consider "--target=i686
> --host=x86_64 --build=i686")
>
> ...Takumi
>



More information about the llvm-dev mailing list