cross-compiling

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

cross-compiling

Vincent R.
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 ?



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Anton Korobeynikov
Hello Vincent

> ./configure --enable-optimized --build=i386-mingw32msvc
> --target=i386-mingw32msvc
What do you want to do? E.g. on which system you running the build,
which system you want to target?

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Vincent R.
On Mon, 15 Feb 2010 20:28:47 +0300, Anton Korobeynikov
<[hidden email]> wrote:
> Hello Vincent
>
>> ./configure --enable-optimized --build=i386-mingw32msvc
>> --target=i386-mingw32msvc
> What do you want to do? E.g. on which system you running the build,
> which system you want to target?

I am building on MacOS SnowLeopard and I want to generate binaries running
on Windows.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Anton Korobeynikov
> I am building on MacOS SnowLeopard and I want to generate binaries running
> on Windows.
Ok, then surely you need to put build=darwin and host=target=mingw32

In your case - I think your were confused by BuildTools directory -
consider removing it.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Vincent R.
On Mon, 15 Feb 2010 20:44:45 +0300, Anton Korobeynikov
<[hidden email]> wrote:
>> I am building on MacOS SnowLeopard and I want to generate binaries
>> running
>> on Windows.
> Ok, then surely you need to put build=darwin and host=target=mingw32
>
> In your case - I think your were confused by BuildTools directory -
> consider removing it.

you mean something like that :

./configure --enable-optimized --build=darwin --host=mingw32
--target=mingw32

checking build system type... Invalid configuration `darwin': machine
`darwin' not recognized


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Anton Korobeynikov
Vincent,

> ./configure --enable-optimized --build=darwin --host=mingw32
> --target=mingw32
>
> checking build system type... Invalid configuration `darwin': machine
> `darwin' not recognized
You need to provide proper target triplets here :)

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Vincent R.
On Mon, 15 Feb 2010 20:51:30 +0300, Anton Korobeynikov
<[hidden email]> wrote:
> Vincent,
>
>> ./configure --enable-optimized --build=darwin --host=mingw32
>> --target=mingw32
>>
>> checking build system type... Invalid configuration `darwin': machine
>> `darwin' not recognized
> You need to provide proper target triplets here :)

Also tried :

./configure --enable-optimized --build=i386-apple-darwin10.2.0 \
--host=i386-mingw32msvc \
--target=i386-mingw32msvc

and remove BuildTools:

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

Will try on my home system because I have already noticed some issues at
work
but if someone on SnowLeopard could try ...

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Anton Korobeynikov
> Will try on my home system because I have already noticed some issues at
> work but if someone on SnowLeopard could try ...
It perefectly works on buildbot.
I'd suggest you to do a clean checkout / remove extra stuff.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: cross-compiling

Kona Blend
mingw32 cross (debug) build succeeds for me too. though it produces one huge clang.exe :)

build:
- llvm/clang trunk r96248
- Mac OS X 10.6.2

mingw32 toolchain based on:
- mingwrt-3.17-mingw32-dev.tar.gz
- w32api-3.14-mingw32-dev.tar.gz
- binutils-2.20.51.0.6.tar.bz2
- gmp-4.3.2.tar.bz2
- mpfr-2.4.2.tar.bz2
- gcc-4.4.3.tar.bz2
 
--kb

On 2010-02-15, at 1:21 PM, Anton Korobeynikov wrote:

>> Will try on my home system because I have already noticed some issues at
>> work but if someone on SnowLeopard could try ...
> It perefectly works on buildbot.
> I'd suggest you to do a clean checkout / remove extra stuff.
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev