[LLVMdev] Compiler-RT for foreign target, still stumped

Solra Bizna solra at bizna.name
Mon May 4 10:48:49 PDT 2015


As I said in my previous message, I have an ARMv7-A system in
big-endian mode and I'm trying to target it with Clang on an AMD64
Linux machine. I'm only missing a build of compiler-rt for this
platform. The last answer I was given implied that successfully
cross-compiling Clang for this platform will get me a build of
compiler-rt for it. While that's probably true, I've determined that
doing so is quite impossible, mainly because there's no OS to build
against.

I eventually managed to discover the (apparently undocumented)
"COMPILER_RT_TEST_TARGET_ARCH" option, and setting it to "arm" does
result in it *attempting* to build compiler-rt for ARM processors...
which promptly fails as it doesn't add other command-line options that
are necessary for this, and doesn't provide any obvious way to specify
them. I hacked away at ".../compiler-rt/cmake/config-ix.cmake" for a
while, trying to find some magic combination of options that would
make the build succeed, and finally gave up upon hitting "undefined
symbol" errors. (Things only got worse when I tried to build with
-mbig-endian...)

The only plan I have left is to yank out compiler-rt and basically
write a build system around it to build it for this specific target.
This goes against my instincts pretty hard. Is there no
currently-existing way at all to build compiler-rt independently of a
whole build of Clang/LLVM, even for a single target?



More information about the llvm-dev mailing list