[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiling 2 files with different compilers based on --host and --bui
From: |
vtorri |
Subject: |
Re: compiling 2 files with different compilers based on --host and --build |
Date: |
Mon, 28 Jul 2008 23:20:08 +0200 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.0.2) |
Quoting Keith Marshall <address@hidden>:
On Monday 28 July 2008 19:54:01 address@hidden wrote:
I have 2 files : foo.c and bar.c
when I cross compile, i want to compile foo.c with the host compiler
and bar.c with the current compiler
Is it possible if I pass values to --build and --host ?
Yes, it is possible, if you set the package up suitably; usually you
will segregate the files to be compiled with the build compiler into a
separate directory from those to be compiled with the host compiler.
For an example, you could take a look at how I did for the `man'
package for MinGW: http://mingw.cvs.sourceforge.net/mingw/man/
(In this package, sources in the `tools' directory are compiled for the
build platform, while the remainder of the package is compiled for the
host).
it's exactly what I want, and indeed, the code are in separate directories. I
thought about a configure script inside another (what you do, it seems), but i
didn't have any idea how to propagate the values. It's all in your m4 macros.
for example:
./configure --build=i686-pc-linux-gnu --host=mingw
foo.c is compiled with mingw32-gcc (or whatever its name is)
bar.c is compiled with my usual gcc
FTR, your example is not self-consistent: if your cross compiler is
called `mingw32-gcc', then you must specify `--host=mingw32' when you
run configure.
yes, it's a typo
thank you very much
Vincent Torri
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.