pbiering/ipv6calc

CPPFLAGS not used by the build system

Closed this issue · 1 comments

While autoconf (./configure) seems to be obeying CPPFLAGS from the environment, this does not seem to be used by Makefile etc. when building .c files to .o.

(Note: I see that in master the CPPLAGS -> CPPFLAGS typo has been fixed. This is unrelated.)

Distributions often pass default build flags through both CFLAGS and CPPFLAGS, as appropriate. For example, Debian, when the "foritfy" hardening flag is enabled, passes "-D_FORTIFY_SOURCE=2" to CPPFLAGS. The build system seems to entirely ignore this right now, requiring the use of workarounds.

Separately, I don't understand the DEFAULT_CFLAGS variable. Given one can pass CFLAGS to ./configure through the environment, why employ an additional variable?

fixed by a2dd4d8 incl. alignments