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

Paul Eggert via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 10:58:52 PST 2022


On 2022-11-16 10:59, Zack Weinberg wrote:
> I'm generally in agreement with Rich Felker's argument (inhttps://ewontfix.com/13/) that AC_CHECK_FUNC*should not*  just probe for linkability of a symbol

So am I. I'm not saying Autoconf should never change here, only that the 
change would not be trivial. It would require changing many configure.ac 
scripts scattered over many software projects, because Autoconf cannot 
be expected to know every signature of every function in every library.

Any such transition could not be done in a week, or a month, or even a 
year. I would guess it would take a decade at least. In the meantime if 
Clang becomes pickier by default it would be helpful if there were a 
well-defined way to shut off Clang's pickiness. If the Clang developers 
provide such a way we can use it; if not, Autoconf will just have to do 
what it always does, and figure a way out anyway (hey! it could drop 
into assembler...).

Things would be simpler if Clang became pickier by default only for 
declarations that are not "char foo();" or "char foo(void);". Then, 
existing 'configure' scripts would still work.


More information about the cfe-commits mailing list