[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: architecture issues
From: |
Sebastian Reitenbach |
Subject: |
RE: architecture issues |
Date: |
Sat, 31 May 2008 12:54:34 +0200 |
nicola.pero@meta-innovation.com wrote:
>
> > Inside a GNUmakefile, that variable is always set - in both gnustep-make
v1
> > and v2.
> >
> > Outside a GNUmakefile (eg, in a configure script), it is set in
gnustep-make v1,
> > but not in gnustep-make v2. In gnustep-make v2 you can still get the
value
> > of that variable by executing
> >
> > gnustep-config --variable=GNUSTEP_HOST_CPU
> >
> > the gnustep-config script should always be in your PATH if gnustep-make
v2
> > was installed correctly.
>
> PS: If you want to support cross-compilation, you may need to use
> the GNUSTEP_TARGET_CPU variable instead.
>
> That's quite easy. The variable is defined inside a GNUmakefile, in both
v1 and
> v2. :-)
>
> Outside a GNUmakefile - eg, in a configure script - the variable should be
set
> to whatever --target=TARGET was passed on the command-line (it's then the
> responsibility of whoever is compiling to pass the right one) or, if
no --target=
> option was passed, to GNUSTEP_HOST_CPU, as determined using the
gnustep-config script.
> :-)
I took a look at the problem on that host again:
GNUSTEP_HOST=i486-pc-linux-gnu
GNUSTEP_HOST_CPU=ix86
In the GNUmakefile, the GNUSTEP_TARGET_CPU is already used as it should be:
libNGStreams_INCLUDE_DIRS += \
-I$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS) \
...
I took a look again, at the configure script. There the target defaults to
the same value as the host is, if not otherwise specified.
and it uses a config.guess script to figure out, what host system it is, and
it outputs: x86_64-unknown-linux-gnu on that host.
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify
one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
I saw you updated the config.guess and config.sub for gnustep-make, so I
checked out svn, and replaced both files with these from gnustep-make, but
still the same output.
Then I reran configure with --target=ix86-unknown-linux-gnu, and then it
worked.
Nevertheless, I more or less dropped the usage of the config.guess at all,
and just set
host_alias=`gnustep-config --variable=GNUSTEP_HOST`
in the NONE clause of the case statement, and it worked well.
Could that be considered a safe method everywhere?
thanks
Sebastian