From: Willy Tarreau Date: Wed, 24 May 2023 13:23:34 +0000 (+0200) Subject: BUILD: makefile: fix build issue on GNU make < 3.82 X-Git-Tag: v2.8-dev13~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e1c28873ccdc9e9f7ca24bb533023a62ae3886e;p=thirdparty%2Fhaproxy.git BUILD: makefile: fix build issue on GNU make < 3.82 Thierry Fournier reported a build breakage with the ubiquitous make 3.81, LDFLAGS were ignored. This is caused by the declaration of the collect_opt_flags macro that is defined with an "=" sign, something that only appeared in 3.82 and that is not necessary. With it removed, the build now works fine at least from 3.80 to 4.3. No backport is needed since this makefile cleanup appeared in 2.8. --- diff --git a/include/make/options.mk b/include/make/options.mk index 1f9aaba691..022981cb80 100644 --- a/include/make/options.mk +++ b/include/make/options.mk @@ -39,7 +39,7 @@ reset_opt_vars = $(foreach name,INC LIB CFLAGS LDFLAGS SRC,$(eval $(1)_$(name)=) reset_opts_vars = $(foreach opt,$(patsubst USE_%,%,$(use_opts)),$(call reset_opt_vars,$(opt))) # append $(1)_{C,LD}FLAGS into OPTIONS_{C,LD}FLAGS if not empty -define collect_opt_flags = +define collect_opt_flags ifneq ($$($(1)_CFLAGS),) OPTIONS_CFLAGS += $$($(1)_CFLAGS) endif