Compiler-RT for foreign target, still stumped

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

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

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?


Hi Solra,

I have build rules that I use to build compiler-rt and libc++ for various targets
including big and little endian ARM hard and soft float.
You can find them at [svn] Index of /ellcc/trunk/libecc
Makefile is the Main build file. It creates a target specific directory and copies
Makefile.lib into it. Makefile.lib is then used to build the actual library.
You'll need to tweak the build rules a bit since I rely on ELLCC's use of config files
to define where include files are and what compiler options to use.
The config file for armeb:

Hope this helps.