gnustep-dev
[Top][All Lists]
Advanced

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

Re: Once more cross compilation


From: Fred Kiefer
Subject: Re: Once more cross compilation
Date: Sun, 22 Aug 2004 19:18:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114

Nicola Pero wrote:
With my crocsscompiling attempt I did get much further after changing the intalled common.make to use:

ifeq ($(GNUSTEP_FLATTENED),)
  WHICH_LIB_SCRIPT \
        = 
$(GNUSTEP_MAKEFILES)/$(GNUSTEP_BUILD_CPU)/$(GNUSTEP_BUILD_OS)/which_lib
else
  WHICH_LIB_SCRIPT = $(GNUSTEP_MAKEFILES)/which_lib
endif


which_lib should be in the GNUSTEP_HOST_* keyed directory (so the existing
code is correct) ... but if that doesn't work because which_lib is in the
GNUSTEP_BUILD_* directory, then it's probably gnustep-make's own
GNUmakefile's fault for installing it in the wrong place, so you probably
want to fix GNUmakefile.in


Lets take up this discussion again. As the results from my tests seem to show, GNUstep should stick with the standard definitions of the three machine environment variables BUILD, HOST and TARGET (as used by autoconf) and change the documentation and usage to that. That is:

BUILD, the machine, where the configuration and compilation takes place.
HOST, the machine, where the resulting  application will be run.
TARGET, the machine, where the output of the application will be used. Mostly relevant when compiling a crosscompiler. GNUstep may savely ignore this in most cases.

That is GNUstep components will need to be configured for crosscompilation like this:
./configure --disable-flattened --host=arm-linux --build=ix86-linux

The only added complexity is that gnustep-make needs to be compiled twice, one additional time with HOST set to BUILD, as it is needed for the build process of the other GNUstep components. But this remark and that a non-flattend structure should be used is already in the documentation.

After this change in the documentation the above change is needed (As you surely will agree) to get the correct which_lib selected. The fine thing is that for environments where BUILD=HOST=TARGET this will make no difference also, in the flattend case. So the only environment where this may cause trouble could be the MINGW on Cygwin case, with the current build instructions, so I would suggest that we change them as well to use BUILD and HOST instead of TARGET.

I don't have any hard opinion on what we should do to the usage of GNUSTEP_HOST_XXX in the GNUstep.sh. They seem to be self contained and should not cause any trouble, so we could just keep them, although the names would now be inconsistent.

If you still disagree, I would like to get instructions on how to run a cross-compilation of GNUstep. Everything you suggested up to now just doesn't work and this suggested shema is consistent with the autoconf manual I have lying here on my desk. The only other idea I have still left is that we are using a rather strange way to sort out HOST and TARGET in the configure.ac file. The automake manual suggests to use AC_CANONICAL_SYSTEM whereas we use AC_CANONICAL_TARGET. But I don't expect that to make much of a change.

Fred







reply via email to

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