summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2021-07-06 18:27:00 +0100
committerJens Axboe <axboe@kernel.dk>2021-07-07 07:05:08 -0600
commit7a9cc9c93c1384f72ac16d1d7980e158ec5f9f0a (patch)
treeb94bdeab62e0ebc6946da354b908e1e1d48bfe54
parent77c72e0f504364adf6a0e8f1155fdf3fd68ef248 (diff)
downloadfio-7a9cc9c93c1384f72ac16d1d7980e158ec5f9f0a.tar.gz
fio-7a9cc9c93c1384f72ac16d1d7980e158ec5f9f0a.tar.bz2
Makefile: use override directive on engine CFLAGS
The GNU Make documentation says the following about the override keyword: Subsequent assignments or appends to this variable which are not marked override will be ignored. https://www.gnu.org/software/make/manual/html_node/Override-Directive.html When the override CFLAGS line was moved in commit f4bd2c3d80bc35f76892205a7e50426711e3def3 it broke the engine template, which does not use the override directive. Since the engine template is now evaluated afterwards, the engine CFLAGS are ignored. Add the override keyword to the engine template so that engine CFLAGS are honored again. Note that the CONFIG_DYNAMIC_ENGINES case doesn't need the override directive. It seems that GNU Make assigns CFLAGS even without the override directive in this case: $$($(1)_OBJS): CFLAGS := -fPIC $$($(1)_CFLAGS) $(CFLAGS) Fixes: f4bd2c3d80bc35f76892205a7e50426711e3def3 ("fix dynamic engine build") Cc: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f57569d5..510e07fc 100644
--- a/Makefile
+++ b/Makefile
@@ -293,7 +293,7 @@ else # !CONFIG_DYNAMIC_ENGINES
define engine_template =
SOURCE += $$($(1)_SRCS)
LIBS += $$($(1)_LIBS)
-CFLAGS += $$($(1)_CFLAGS)
+override CFLAGS += $$($(1)_CFLAGS)
endef
endif