Re: How can Autoconf help with the transition to stricter compilation defaults?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 10 Nov 2022, Zack Weinberg wrote:

The biggest remaining (potential) problem, that I’m aware of, is that
AC_CHECK_FUNC unconditionally declares the function we’re probing for
as ‘char NAME (void)’, and asks the compiler to call it with no
arguments, regardless of what its prototype actually is.  It is not

This does seem like the biggest problem since it would appear to require that new macros are used and that the configure.ac developer would need to supply additional syntax (where syntax does not currently exist) in order to succeed with linking. It is not possible for Autoconf itself to anticipate the function names used by libraries and assume some specific prototype.

There was already the issue that when testing for functions in static libraries (or libraries which otherwise require full linkage) that it is necessary to supply the library dependencies at the same time. It might also be necessary to provide the linker search paths as well.

While GCC is GNU's compiler, there is too much focus on GCC here. Any compiler currently usable with Autoconf might change to conform with the standard such that configure scripts no longer work with it.

The only reassurance is that GCC/Clang authors can not do what they want to do without providing a means for Autoconf and other similar test-based systems to work as is since Autoconf is so important.

Bob
--
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux