Hello list, The CFLAGS variable should not be set in configure.ac. Of course, it is fine to temporarily set it to a different value to test compilation, but it should not set "defaults" in CFLAGS, since that overrides whatever the user sets in the environment.
For example, I compiled with CFLAGS='-O0 g3' to debug a (different) bug in Guile with gdb, and I did not have any access to macros. After a lot of head scratching I resorted to asking for help and https://sourceware.org/bugzilla/show_bug.cgi?id=32381 was pointed out to me. In short, Guile injected -flto which enables LTO and gdb cannot trace line numbers correctly. Instead, configure.ac should be setting defaults in AM_CFLAGS. I will send a patch moving -flto and -Werror=array-bounds from CFLAGS to AM_CFLAGS. Regards, Nikolaos Chatzikonstantinou
