Hello,<br><br><br>For the last couple of days I struggled to find a way to compile LLVM with Clang for ARM. Now, I tried many variations of the settings, linkers and compilers, but I was able only to build for i386 and x86_64. My machine is an i386 iMac. This is my first attempt to cross-compile something, so probably I'm doing something incredible stupid.<br>
<br>First, I'm not sure which compiler should I use.  I tried:<br><br>CXX="$DEVROOT/usr/bin/llvm-g++-4.2"<br>CC="$DEVROOT/usr/bin/llvm-gcc-4.2"<br><br>CXX="$DEVROOT/usr/bin/g++-4.2"<br>
CC="$DEVROOT/usr/bin/gcc-4.2"<br><br><br>Here is my conf: ../llvm/configure --host=armv7-apple-darwin --target=armv7-apple-darwin --build=i386-apple-darwin --enable-optimized --disable-debug --disable-expensive-checks --disable-doxygen  --disable-threads --enable-targets=arm<br>
<br><br>Just after I run configure, I get:<br><br><br>checking for armv7-apple-darwin-clang... no<br>checking for armv7-apple-darwin-llvm-gcc... no<br>checking for armv7-apple-darwin-gcc... no<br>checking for clang... clang<br>
configure: WARNING: In the future, Autoconf will not detect cross-tools<br>whose name does not start with the host triplet.  If you think this<br>configuration is useful to you, please write to <a href="mailto:autoconf@gnu.org">autoconf@gnu.org</a>.<br>
checking for C compiler default output file name... a.out<br><b>checking whether the C compiler works... yes<br>checking whether we are cross compiling... yes</b><br>checking for suffix of executables... <br>checking for suffix of object files... o<br>
checking whether we are using the GNU C compiler... yes<br>checking whether clang accepts -g... yes<br>checking for clang option to accept ISO C89... none needed<br>checking for armv7-apple-darwin-clang++... no<br>checking for armv7-apple-darwin-llvm-g++... no<br>
checking for armv7-apple-darwin-g++... no<br>checking for clang++... clang++<br>checking whether we are using the GNU C++ compiler... yes<br>checking whether clang++ accepts -g... yes<br>checking how to run the C preprocessor... clang -E<br>
configure: WARNING: Unknown project (.svn) won't be configured automatically<br>checking build system type... i386-apple-darwin<br>checking host system type... armv7-apple-darwin<br>checking target system type... armv7-apple-darwin<br>
checking type of operating system we're going to host on... Darwin<br>checking type of operating system we're going to target... Darwin<br><b>checking target architecture... ARM</b><br>checking for grep that handles long lines and -e... /usr/bin/grep<br>
checking for egrep... /usr/bin/grep -E<br>checking for ANSI C header files... yes<br>checking for sys/types.h... yes<br>checking for sys/stat.h... yes<br>checking for stdlib.h... yes<br>checking for string.h... yes<br>checking for memory.h... yes<br>
checking for strings.h... yes<br>checking for inttypes.h... yes<br>checking for stdint.h... yes<br>checking for unistd.h... yes<br>checking whether byte ordering is bigendian... no<br><br><br><br><br>Everythings seems to be fine, it targets ARM and its cross-compiling, however, when I run "make", it makes either a x86_64 or a i386 archive file (.a). <br>
<br><br>I'm sure I'm doing something stupid somewhere...  <br><br><br><br clear="all"><br>-- <br>Regards,<br><span style="color:rgb(102, 102, 102)">R.</span><br><br>