2b0cd7cceb
Rebased on top of Martin Wilck's queue of ACKed upstream commits * https://github.com/openSUSE/multipath-tools/tree/upstream-queue * All previous patches have been reordered, with the exception of 0011-libdmmp-Add-support-for-upcoming-json-c-0.14.0.patch which has been replaced with 0029-fix-boolean-value-with-json-c-0.14.patch Modify 0054-RH-add-mpathconf.patch * remove default enable_foreign and property blacklist_exceptions settings, and deal with the builtin default change from 0031-libmultipath-set-enable_foreign-to-NONE-by-default.patch. Fixes bz #1853668 Add 0048-Makefile.inc-trim-extra-information-from-systemd-ver.patch Add 0049-kpartx-fix-Wsign-compare-error.patch * The above two patches have been submitted upstream
45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Mon, 11 May 2020 15:27:34 +0200
|
|
Subject: [PATCH] multipath-tools: Makefile.inc: separate out OPTFLAGS
|
|
|
|
OPTFLAGS is what distribution builds would typically override. That
|
|
should not include the warning flags we use.
|
|
|
|
Moreover, in the definition of CFLAGS, put $(CFLAGS) first to make it
|
|
easier for the user to spot her input in the build logs.
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
Makefile.inc | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/Makefile.inc b/Makefile.inc
|
|
index d4d1e0dd..7a59db85 100644
|
|
--- a/Makefile.inc
|
|
+++ b/Makefile.inc
|
|
@@ -93,14 +93,14 @@ STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
|
|
ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,)
|
|
WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered,)
|
|
|
|
-OPTFLAGS = -O2 -g -pipe -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int \
|
|
+OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
|
|
+WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int \
|
|
-Werror=implicit-function-declaration -Werror=format-security \
|
|
- $(WNOCLOBBERED) \
|
|
- -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \
|
|
- $(STACKPROT) --param=ssp-buffer-size=4
|
|
+ $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
|
|
CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
|
|
-CFLAGS := $(OPTFLAGS) -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
|
|
- -MMD -MP $(CFLAGS)
|
|
+CFLAGS := $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
|
|
+ -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
|
|
+ -MMD -MP
|
|
BIN_CFLAGS = -fPIE -DPIE
|
|
LIB_CFLAGS = -fPIC
|
|
SHARED_FLAGS = -shared
|
|
--
|
|
2.17.2
|
|
|