gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Once more cross compilation


From: BALATON Zoltan
Subject: Re: Once more cross compilation
Date: Sat, 17 Jul 2004 11:54:05 +0200 (CEST)

On Wed, 14 Jul 2004, Fred Kiefer wrote:
> BUILD is the system where the compilcation is run and TARGET is the
> system where the result of the application will be used. HOST is the
> system where the result of the compilation will be used. Normally HOST
> and TARGET are the same. The only difference is when building a cross
> compiler HOST will be the system the cross compiler runs on and TARGET
> the system where the generated code will run.

I'm not opposed to your changes but I don't understand your reasoning so I
have a few questions. The autoconf info docs say:

     There may be some features `configure' can not figure out
  automatically, but needs to determine by the type of host the package
  will run on.  Usually `configure' can figure that out, but if it prints
  a message saying it can not guess the host type, give it the
  `--host=TYPE' option. [...]

     If you are building compiler tools for cross-compiling, you can also
  use the `--target=TYPE' option to select the type of system they will
  produce code for and the `--build=TYPE' option to select the type of
  system on which you are compiling the package.

So in my interpretation of the above HOST is normally specified and means
where the thing will run on. Normally HOST and BUILD are the same but you
could specify HOST to crosscompile the package. You may specify a TARGET
for a crosscompiler as specifying HOST would crosscomile a compiler to be
run on HOST and not compile a crosscompiler to be run on the BUILD system
and generate code for another.

> A few examples:
> - Most often all three systems are the same.
> - When compiling for MinGW in a Cygwin environment BUILD and HOST are
> Cygwin whereas Target is MINGW.

Compiling what? When compiling a crosscompiler then yes. When
crosscompiling under Cygwin for MinGW then BUILD would be Cygwin, HOST
would be MinGW and TARGET is not relevant but would probably be MinGW too.

> - When compiling GNUstep on a Intel Linux machine to run it on a Zaurus
> ARM processor BUILD is x86-* and HOST and Target both are arm-*.

So when crosscompiling a complier on ix86 Linux to run on Cygwin to
compile to MinGW then BUILD=linux, HOST=Cygwin and TARGET=MinGW?

> And in the last case GNUstep goes wrong. There are a few obvious
> problems in the make package. For example target.make tests on line 1010
> for GNUSTEP_HOST_CPU, where obviously GNSUSTEP_TARGET_CPU should be
> used. But this is only a minor problem, compared to the fact that I
> think almost everywhere in the GNUstep make files and make helpers that
> BUILD should be used in place of HOST.

If I understood the above correctly you are probably right.

> For example ld_lib_path.sh uses
> only HOST, but never BUILD to determine and even common.make uses

On which system ld_lib_path.sh is used? Is it only used during compilation
or also by the app wrapper when running the app? In the latter case it is
not clear if it should be HOST or BUILD.

> $(GNUSTEP_MAKEFILES)/$(GNUSTEP_HOST_CPU)/$(GNUSTEP_HOST_OS)/which_lib to
> find which GNUstep libraries to link. Of course this fails as soon as
> HOST!=BUILD.

This is clearly for compilation so it should use BUILD.

> When cross compiling GNUstep you first build make for the BUILD and than
> for the TARGET, so this would work with HOST replaced by BUILD. And this
> is what I suggest, replacing HOST with BUILD in most make files. As I

What is the significance of TARGET while crosscompiling GNUstep as it is
not a compiler?

Regards,
BALATON Zoltan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]