]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: makefile: allow to use CFLAGS to append build options
authorWilly Tarreau <w@1wt.eu>
Wed, 10 Apr 2024 09:29:49 +0000 (11:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Apr 2024 15:25:45 +0000 (17:25 +0200)
commit5f1768b78ab79aeecb0e774b60533a09f790e5dc
treef49a2cb22641e8f3e209411ec92d1c5d2fb6505c
parentc42fca1db27f3b79fa0b52869c3eb94104a82561
BUILD: makefile: allow to use CFLAGS to append build options

CFLAGS has always been a troublemaker because the variable was preset
based on other options, including dynamically detected ones, so
overriding it would just lose the original contents, forcing users
to resort to various alternatives such as DEFINE, ADDINC or SMALL_OPTS.

Now that the variable's usage was cleared, let's just preset it to
empty (and it MUST absolutely remain like this) and append it at the
end of the compiler's options. This will now allow to change an
optimization level, force a CPU type or disable a warning as users
commonly expect from CFLAGS passed to a makefile, and not to override
*all* the compiler flags as it has progressively become.
INSTALL
Makefile