[RFC] Update to current automake/autoconf/libtool versions.

Alexandre Oliva aoliva@redhat.com
Mon Dec 9 18:56:00 GMT 2002

On Dec  7, 2002, Zack Weinberg <zack@codesourcery.com> wrote:

> Alexandre Oliva <aoliva@redhat.com> writes:
>> On Dec  5, 2002, Zack Weinberg <zack@codesourcery.com> wrote:
>>> AC_NO_EXECUTABLES has two effects: (1) it disables the equivalent of
>>> AC_PROG_CC_WORKS, which is what we need.  But, (2) it causes autoconf
>>> to barf if an AC_TRY_LINK test appears anywhere in the script being
>>> generated.
>> Please tell me why (2) doesn't make sense.
>> If AC_PROG_CC_WORKS can't even link a do-nothing program, how would
>> you expect to get any useful results from AC_TRY_LINK?

> Because libstdc++'s AC_TRY_LINK tests are only executed in a situation
> where AC_PROG_CC_WORKS would have succeeded (i.e. a native compilation).

I don't get it.  Why does being able to link have anything to do with
being native?  Being able to *run* tests has to do with being native,
but that's not the point, and autoconf already avoids running tests
when cross-building.  But being able to link has to do with whether
the libraries that the compiler links in by default are present or
not.  That's the purpose of AC_NO_EXECUTABLES: to disable link tests
while building a library that the compiler driver would attempt to link
in by default, such as newlib, libstdc++ or libgcj.

That said, I'm not sure it should be used for libstdc++, since there's
no reason to use g++: we should use gcc instead, even if we perform
C++ link tests.  Ditto for libjava, I suppose, but I realize it would
be far trickier to get libjava to link C programs :-)

Still, I think AC_NO_EXECUTABLES may affect all linking whatsoever,
not only that of the language in effect at the point it appears, which
does indeed make it useless for anything other that newlib.  But, for
newlib, preventing link tests *is* the right thing to do, and I
contend that it's the right thing to do for any language affected by
the AC_NO_EXECUTABLES declaration.

Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

More information about the Newlib mailing list