[cfe-dev] cross-compiling

Vincent Richomme forumer at smartmobili.com
Mon Feb 15 09:17:50 PST 2010


Hi,

I am stress testing clang build system and today my last idea was to
cross-compile clang
on SnowLeopard system using mingw from Cocotron project(they have a very
nice script
to get/compile/install latest mingw toolchain :
http://www.cocotron.org/Tools/Downloads/InstallCDT-2009-12-17.zip
sudo sh install.sh
export PATH=/Developer/Cocotron/1.0/Windows/i386/gcc-4.3.1/bin:$PATH)

So now the question is what should I pass to configure, because I tried
the following


./configure --enable-optimized --build=i386-mingw32msvc
--target=i386-mingw32msvc
make
llvm[1]: Compiling Alarm.cpp for Release build
In file included from Alarm.cpp:32:
Win32/Alarm.inc:39: error: expected initializer before ‘Sleep’
make[1]: *** [/Users/amartin/src/llvm/lib/System/Release/Alarm.o] Error 1
make: *** [all] Error 1


Don't seem to work so I tried also :
./configure --enable-optimized --host=i386-mingw32msvc
make
configure: error: Already configured in /Users/amartin/src/llvm
make[1]: *** No targets specified and no makefile found.  Stop.
make: *** [cross-compile-build-tools] Error 1


./configure --enable-optimized --host=i386-mingw32msvc
--target=i386-mingw32msvc
configure: error: Already configured in /Users/amartin/src/llvm
make[1]: *** No targets specified and no makefile found.  Stop.
make: *** [cross-compile-build-tools] Error 1

How do you-cross compile ?






More information about the cfe-dev mailing list