Bugzilla – Bug 454
Remove ACX_CHECK_COMPILER_FLAG from configure.ac
Last modified: 2012-07-19 10:52:53 CEST
On my system I have a file /etc/config.site, specifying the CFLAGS options I want to use for compilation. It contains -O3 and does not contain -g . That said, I want to compile my libraries without -g . However, the usage of ACX_CHECK_COMPILER_FLAG in configure.ac adds to CFLAGS both -O2 and -g, so at the end the CFLAGS used for compilation are -O2 -g -O3 . This is wrong, CFLAGS shall be just -O3 . Please remove ACX_CHECK_COMPILER_FLAG from ldns/configure.ac, at least with first parameter g and O2 .
You are absolutely right. I have removed those from configure.ac.
Please remove the checks for -g and -O2 in unbound:configure.ac , too.
There is a check in unbound now, that if you specify CFLAGS, then it does not append -g -O2. If you give no CFLAGS, then it will use -g -O2 (since some platforms require these sort of flags to produce a 'normal' executable).