]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: fix build issue on GNU make < 3.82
authorWilly Tarreau <w@1wt.eu>
Wed, 24 May 2023 13:23:34 +0000 (15:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 May 2023 13:51:03 +0000 (15:51 +0200)
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.

include/make/options.mk

index 1f9aaba69142c12130833466b1885350e150b0c7..022981cb809bb3d819f506ce520e60e1708905d6 100644 (file)
@@ -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