CLIB
Zack Weinberg
zackw@Stanford.EDU
Fri May 4 11:24:00 GMT 2001
On Fri, May 04, 2001 at 05:25:33AM -0400, Richard Kenner wrote:
> If all Ada programs for Dec Unix need it, then perhaps the gnat driver
> should be adjusted to add it to the link line automatically on that
> target? That shouldn't be too hard.
>
> It already does, for user programs, but that doesn't help the linking
> of gnat1 itself, wich is not done via the GNAT driver but directly in
> the GCC Makefile. The latter is the major motivation.
I'll assume you have a good reason for that. You can clone the logic
which is presently being used in configure.in to determine whether or
not collect2 needs to link with -lld or -lmld. It should look
something like
save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS(exc_resume, exc)
GNAT_LIBEXC="$LIBS"
LIBS="$save_LIBS
AC_SUBST(GNAT_LIBEXC)
and then use @GNAT_LIBEXC@ on the link line for gnat1. I don't
remember if Autoconf does substitutions inside Make-lang.in, you may
have to indirect through a variable in the main Makefile.
You could keep this in your tree until you're ready to merge Ada into
the official GCC repository, or merge it separately; if you choose to
do it separately, please include a comment explaining what it's for so
it doesn't get accidentally removed.
zw
More information about the Gcc
mailing list