Skip to content
Snippets Groups Projects
Commit 9d8c84b6 authored by Vassil Vassilev's avatar Vassil Vassilev
Browse files

Implement support for cross-compilation with clang, using gcc toolchain.

When building modules with clang from the trunk we need to build with gcc's
libstdc++. Apparently this can be done in clang in 2 ways:
  1. Building clang with -DGCC_INSTALL_PREFIX=$(dirname `which gcc`)/../
     This would hardcode the patch to the gcc toolchain when compiling clang.
  2. Pass on every compiler invocation --gcc-toolchain=$(dirname `which gcc`)/../
     This allows relocatability of the toolchain.

I decided to implement the second option and got stuck with implementing it in
cmake. One of the reasons was I was unable to pass --gcc-toolchain early enough
and try_compile fails at very early stages.

Finally I decided to go for the first option hardcoding the gcc toolchain path
at clang built time. This is sufficient for modules.

This commit serializes the progress I did on 2 in configure make. Now we can
configure with --gcc-toolchain in configure-make.
parent 98bc8bfb
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment