This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
libada configure contains wrong code and GNAT as a cross compiler in general
- From: "Luke A. Guest" <laguest at archeia dot com>
- To: GCC ML <gcc at gcc dot gnu dot org>
- Date: Wed, 09 Jan 2013 08:43:11 +0000
- Subject: libada configure contains wrong code and GNAT as a cross compiler in general
Hi,
I'm trying to add GNAT to Yocto and still coming across problems. I have
a number of questions about GNAT as a cross compiler, I know it wasn't
designed as one within the GCC tree, but I think it needs to be capable
of building as one to match the other compilers.
1) The latest problem I'm having is that it fails to build
libgnat-4.6.so, I've managed to track it down to the following code
inside libada/configure:
# Determine what to build for 'gnatlib'
if test $build = $target \
&& test ${enable_shared} = yes ; then
# Note that build=target is almost certainly the wrong test; FIXME
default_gnatlib_target="gnatlib-shared"
else
default_gnatlib_target="gnatlib-plain"
fi
Surely, it shouldn't matter whether the $build = $target is true or not,
it should be whether the target supports shared libs or not. So, am I ok
to remove this test (keeping the enable_shared test)? Is there anything
else that could break because of this change?
In fact, should the code in libada/configure script actually do platform
tests, just as they are done in the gnattools/configure script?
2) I also want to point out that inside
gcc/ada/gcc-interface/Makefile.in there are lines such as:
GNATLIB_SHARED = gnatlib-shared-dual
Is these relics? If so, shouldn't the above configure script also use
the "-dual" and the other options available to it?
3) Coming back to gnattools, there are tests in there to set the
TOOLS_TARGET_PAIRS variable, which are also set in
gcc/ada/gcc-interface/Makefile.in, are the ones set in the Makefile.in
also relics? Can they be removed from there?
4) What is the point of the --disable-libada flag exactly? I've seen a
reference to there being a point, just not what that point is,
especially considering it disabled the build of gnattools and if you
disable the link between the two, the gnattools use the system runtime.
I don't understand this at all.
Thanks,
Luke.