Closed thesamesam closed 12 months ago
@thesamesam This seems generally correct and useful. But your change breaks distcheck:
./configure: line 17217: syntax error near unexpected token `-Werror,CFLAGS="$CFLAGS -Werror"'
checking for library containing timer_create... none required
./configure: line 17217: ` AX_CHECK_COMPILE_FLAG(-Werror,CFLAGS="$CFLAGS -Werror")'
Thanks. I can't seem to reproduce it locally yet, although I think I can see how it might happen with the -Werror mangling.
I'm going to switch to AS_IF
as well given bare if
is now recommended against. Let's see if that does the job...
I found the problem. The problem is not that -Werror is used, but that the AX_CHECK_COMPILE_FLAG
macro is not expanded. We must also copy /usr/share/aclocal/ax_check_compile_flag.m4
to the m4 directory.
Thanks for the help - sorry it wasn't as straightforward as it was supposed to be.
Thank you! Applied.
Some distributions are now setting -D_FORTIFY_SOURCE=3 by default in their toolchains rather than _F_S=2. By forcing _F_S=2, this causes both a warning and a downgrade in the effective protection.
Use the autoconf-archive macro for this purpose (AX_ADD_FORTIFY_SOURCE) to add the fortification at the highest supported level if the compiler doesn't already default to it.