[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Building shared library with libtool
I've been trying unsuccessfully the following:
The original command I was using:
-> select the correct compiler binaries: (gcc-cris, etc...)
-> checking host system type... cris-axis-none
The above result (cris-axis-none) which result from
$ ./config.sub cris
leads to the fact that one variable in libtool is set to "none".
Thus, the libtool support is not detected:
2: second try:
-> select the wrong compiler tools (try to look for cris-linux-gcc)
-> checking host system type... cris-axis-linux-gnu
Thus, the compilation fallback to use the default gcc tools and does
not cross compile evrything...
Looking at the generated configure script, the following line
set the prefix to look for the compiler tools:
test -n "$host_alias" && ac_tool_prefix=$host_alias-
Thus, "ac_tool_prefix" is set to the string specified in --host=...
The value is "cris-axis-linux-gnu" for --host=cris-linux
The value is "cris-axis-none" for --host=cris
Then, the "host_os" portion is
set to the third part of the "host_alias")
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
The value is "linux" for --host=cris-linux
The value is "none" for --host=cris
As a conclusion, I feel like the naming for the compiler
might be the wrong ones?
Temporarily, the best idea would be to make links to
cris-* binaries so they can be found with cris-linux-*
I'll try that if there is no other option by now.
On Wed, 18 Feb 2004, Hans-Peter Nilsson wrote:
> > Date: Wed, 18 Feb 2004 18:08:46 +0100
> > From: Hans-Peter Nilsson <firstname.lastname@example.org>
> Talking to myself again, and this isn't strictly about libtool
> > > Date: 18 Feb 2004 17:57:18 +0100
> > > From: email@example.com
> > > On Wed, 2004-02-18 at 17:03, Hans-Peter Nilsson wrote:
> > > > The right use is "./configure --host=cris-axis-linux-gnu"
> > > > (or is it --target=? Confusing as always. Let's assume you
> > > > have that right.)
> > > >
> > > May I even suggest:
> > > "CC=cris-axis-linux-gnu-gcc ; ./configure --host=cris-axis-linux-gnu"
> > You may of course suggest, but that shouldn't be needed, if the
> > right autoconf macro is used (I forgot which one, something with
> > CROSS, IIRC).
> Heh, better correct that little bit of misinformation. For the
> record, and for the amusement of those who do not have the
> autoconf-2.58 documentation and for those who still believe that
> autoconf doesn't go well with cross-compilation: What the
> documentation *does* say is to use AC_CANONICAL_HOST, then
> AC_CHECK_TOOL (alternatively AC_CHECK_TOOLS), rather than
> AC_CHECK_PROGRAM (and AC_CHECK_PROGRAMS), and TRT will happen.
> Really, nothing more than the --host=.. option is needed at the
> configure call, for a cross-build to work, if the cross-tools
> are present. (Beware: I'm not much of an autoconfiscater, I
> mostly pick it up from its use in the toolchain, GCC and
> friends. If when reading this you think you know better, you
> probably do. ;-)
> brgds, H-P