@@ -90,7 +90,8 @@ OPTFLAGS = -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int \
-Wp,-D_FORTIFY_SOURCE=2 $(STACKPROT) \
--param=ssp-buffer-size=4
-CFLAGS = $(OPTFLAGS) -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\"
+CFLAGS := $(OPTFLAGS) -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
+ $(CFLAGS)
BIN_CFLAGS = -fPIE -DPIE
LIB_CFLAGS = -fPIC
SHARED_FLAGS = -shared
--
2.15.1
-------- Forwarded Message --------
Subject: [dm-devel] [PATCH] multipath-tools: Makefile: Respect standard toolchain related envvars
Date: Thu, 30 Nov 2017 00:23:11 +0100
From: Thomas Deutschmann <whissi@gentoo.org>
To: dm-devel@redhat.com
The Makefile overrides standard envvars that control the toolchain flags.
This patch should set things right without reducing default behavior.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
Makefile.inc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
@@ -90,11 +90,12 @@ OPTFLAGS = -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int \
-Wp,-D_FORTIFY_SOURCE=2 $(STACKPROT) \
--param=ssp-buffer-size=4
-CFLAGS = $(OPTFLAGS) -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\"
+CFLAGS ?= $(OPTFLAGS)
+CFLAGS += -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\"
BIN_CFLAGS = -fPIE -DPIE
LIB_CFLAGS = -fPIC
SHARED_FLAGS = -shared
-LDFLAGS = -Wl,-z,relro -Wl,-z,now
+LDFLAGS += -Wl,-z,relro -Wl,-z,now
BIN_LDFLAGS = -pie
# Check whether a function with name $1 has been declared in header file $2.
--
2.15.1