BUILD: makefile: only consider settings from enabled options
authorWilly Tarreau <w@1wt.eu>
Fri, 23 Dec 2022 14:08:38 +0000 (15:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Dec 2022 16:01:55 +0000 (17:01 +0100)
commit6e70a3986cad4fa148e3b32f92a371d18cabc851
treefc2a10a2c6a4b0749e02bf37a9668f7c1acb5fce
parent6a2cd335090ddd8eed9a8e1b95248ef4a6cd5781
BUILD: makefile: only consider settings from enabled options

Due to the previous SSL exception we coudln't restrict the collected
CFLAGS/LDFLAGS to those of enabled options, so all of them were
considered if set. The problem is that it would prevent simply
disabling a build option without unsetting its xxx_CFLAGS or _LDFLAGS
values if those had incompatible values (e.g. -lfoo).

Now that only existing options are listed in collect_opts_flags, we
can safely check that the option is set and only consider its settings
in this case. Thus OT_LDFLAGS will not be used if USE_OT is not set
for example.
include/make/options.mk