summaryrefslogtreecommitdiffstats
path: root/0018-RH-use-rpm-optflags-if-present.patch
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2018-02-15 13:17:53 -0600
committerBenjamin Marzinski <bmarzins@redhat.com>2018-02-15 13:17:53 -0600
commit5bea53fe7ed7dd7afa8e76f7f84f76fdb89d59d9 (patch)
tree9a89c87df6336311ebe30ae2c51af13f92d6a3d6 /0018-RH-use-rpm-optflags-if-present.patch
parent7e8f34e1813a9ae89b5acc012fa7d45c3d7bbdb8 (diff)
downloaddevice-mapper-multipath-5bea53fe7ed7dd7afa8e76f7f84f76fdb89d59d9.tar.gz
device-mapper-multipath-5bea53fe7ed7dd7afa8e76f7f84f76fdb89d59d9.tar.xz
device-mapper-multipath-5bea53fe7ed7dd7afa8e76f7f84f76fdb89d59d9.zip
device-mapper-multipath-0.7.4-1.git07e7bd5master
Update Source to the latest upstream commit * Previous patches 0001-0006 are included in this commit * Previous patches 0007-0014 are now patches 0015-0022 Add 0001-libmultipath-fix-tur-checker-locking.patch * Fixed spinlock bug. posted upstream Add 0002-multipath-fix-DEF_TIMEOUT-use.patch * Add missing sec to ms conversion. posted upstream Add 0003-multipathd-remove-coalesce_paths-from-ev_add_map.patch * Remove unused code. posted upstream Add 0004-multipathd-remove-unused-configure-parameter.patch * Remove unused code. posted upstream Add 0005-Fix-set_no_path_retry-regression.patch * Fix issue with queueing and path addition. posted upstream Add 0006-multipathd-change-spurious-uevent-msg-priority.patch * Change message priority to Notice. posted upstream Add 0007-multipath-print-sysfs-state-in-fast-list-mode.patch * Show sysfs state correctly in fast list mode (-l). posted upstream Add 0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch * Move code around. posted upstream Add 0009-move-waiter-code-from-libmultipath-to-multipathd.patch * Move code around. posted upstream Add 0010-call-start_waiter_thread-before-setup_multipath.patch * Fix race on multipath device creations. posted upstream Add 0011-libmultipath-add-helper-functions.patch * posted upstream Add 0012-multipathd-RFC-add-new-polling-dmevents-waiter-threa.patch * Add alternate method of getting dmevents, that doesn't require a thread per device. posted upstream Add 0013-libmultipath-condlog-log-to-stderr.patch * change condlog to log to stderr instead of stdout. posted upstream Add 0014-multipathd-fix-compiler-warning-for-uev_pathfail_che.patch * fix indentation issue. posted upstream
Diffstat (limited to '0018-RH-use-rpm-optflags-if-present.patch')
-rw-r--r--0018-RH-use-rpm-optflags-if-present.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/0018-RH-use-rpm-optflags-if-present.patch b/0018-RH-use-rpm-optflags-if-present.patch
new file mode 100644
index 0000000..99e0a7e
--- /dev/null
+++ b/0018-RH-use-rpm-optflags-if-present.patch
@@ -0,0 +1,50 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Benjamin Marzinski <bmarzins@redhat.com>
+Date: Wed, 19 Apr 2017 06:10:01 -0500
+Subject: [PATCH] RH: use rpm optflags if present
+
+Use the passed in optflags when compiling as an RPM, and keep the
+default flags as close as possible to the current fedora flags, while
+still being generic.
+
+Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
+---
+ Makefile.inc | 22 +++++++++++++++-------
+ 1 file changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.inc b/Makefile.inc
+index 5145909..0b4ee17 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -82,13 +82,21 @@ TEST_CC_OPTION = $(shell \
+ echo "$(2)"; \
+ fi)
+
+-STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
+-
+-OPTFLAGS = -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int \
+- -Werror=implicit-function-declaration -Werror=format-security \
+- -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered \
+- -Wp,-D_FORTIFY_SOURCE=2 $(STACKPROT) \
+- --param=ssp-buffer-size=4
++ifndef RPM_OPT_FLAGS
++ STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
++ OPTFLAGS = -O2 -g -pipe -Wall -Werror=format-security \
++ -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \
++ $(STACKPROT) --param=ssp-buffer-size=4 \
++ -grecord-gcc-switches
++ ifeq ($(shell test -f /usr/lib/rpm/redhat/redhat-hardened-cc1 && echo 1),1)
++ OPTFLAGS += -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
++ endif
++else
++ OPTFLAGS = $(RPM_OPT_FLAGS)
++endif
++OPTFLAGS += -Wextra -Wstrict-prototypes -Wformat=2 -Werror=implicit-int \
++ -Werror=implicit-function-declaration -Wno-sign-compare \
++ -Wno-unused-parameter
+
+ CFLAGS := $(OPTFLAGS) -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
+ $(CFLAGS)
+--
+2.7.4
+