InterNetNews / inn

INN (InterNetNews) Usenet server
https://www.isc.org/othersoftware/#INN
Other
68 stars 12 forks source link

configure: override default CFLAGS #267

Closed CyberTailor closed 10 months ago

CyberTailor commented 1 year ago

Autoconf adds "-g -O2" by default. This may be undesirable.

Julien-Elie commented 1 year ago

Hi Anna, according to the Autoconf manual:

If output variable CFLAGS was not already set, set it to -g -O2 for the GNU C compiler (-O2 on systems where GCC does not accept -g), or -g for other compilers. If your package does not like this default, then it is acceptable to insert the line : ${CFLAGS=""} after AC_INIT and before AC_PROG_CC to select an empty default instead.

Why would we consider that INN does not like this default? (notably for the -O2 optimization mode)

If you need building it without these flags, couldn't you just configure INN with:

CFLAGS="" ./configure

My worry with your proposal to unconditionally remove these flags is that other people may want them and not consider them as undesirable...

Julien-Elie commented 10 months ago

Closing the issue as you can configure INN with the following command if it suits your needs:

CFLAGS="" ./configure