[LLVMdev] CROSS COMPILING LLVM
Andreas Neustifter
e0325716 at student.tuwien.ac.at
Thu Jun 11 11:09:40 PDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I stumbled over this one too, recently.
hannibal hannibal wrote:
> ................................................
> ...............................................
> configure: creating ./config.status
> config.status: creating Makefile.common
> config.status: executing setup commands
> config.status: executing Makefile commands
> config.status: executing lib/Makefile commands
> config.status: executing lib/sample/Makefile commands
> config.status: executing tools/Makefile commands
> config.status: executing tools/sample/Makefile commands
AFIAK what is following is the configure in the BuildTools folder where
tablegen ant the like are built.
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
> checking type of operating system we're going to host on... Linux
> checking target architecture... x86
> checking for gcc... arm-none-linux-gnueabi-gcc
As you see the only compiler it finds is the arm-cross-compiler, but not
the i686-pc-linux-gnu-compiler to build tablegen natively for the build
environment.
Its no use of setting the CC environment variable to the arm-compiler
since the whole build is using it. You have to have both (the system
compiler for i686-pc-linux-gnu and the cross compiler for
arm-none-linux-gnueabi on your path.
At the configure (with --host=ppc64-linux in this case) you get:
> configure: WARNING: If you wanted to set the --build type, don't use --host.
> If a cross compiler is detected then cross compile mode will be used.
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... powerpc64-unknown-linux-gnu
> checking target system type... powerpc64-unknown-linux-gnu
Thats the proper systems.
> checking type of operating system we're going to host on... Linux
> checking target architecture... PowerPC
> checking for ppc64-linux-gcc... ppc64-linux-gcc
So (in this case) the cross-compiler has to be named ppc64-linux-gcc
>........
> checking for gcc... gcc
And then its also checking for the native compiler to build the BuildTools.
So: puth both compilers (the native one and the cross-compiler) onto the
path and name the cross-compiler so configure finds it.
Andi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoxR+sACgkQPiYq0rq7s/AjQACfUPt+aRozBLt7FAYgx54BCiYC
h6UAnRyOtOivOancU6UucqXnC/CuZpls
=AwkH
-----END PGP SIGNATURE-----
More information about the llvm-dev
mailing list