From 96856821a22dcb399a7b9cad795278506d739435 Mon Sep 17 00:00:00 2001 From: zhangwenlong Date: Wed, 22 Sep 2021 23:46:15 -0400 Subject: [PATCH] build: Add loongarch64 support for device-mapper-multipath Signed-off-by: zhangwenlong --- 0001-modify-OPTFLAGS-for-loongarch64.patch | 41 ++++++++++++++++++++++ device-mapper-multipath.spec | 8 ++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 0001-modify-OPTFLAGS-for-loongarch64.patch diff --git a/0001-modify-OPTFLAGS-for-loongarch64.patch b/0001-modify-OPTFLAGS-for-loongarch64.patch new file mode 100644 index 0000000..736d87e --- /dev/null +++ b/0001-modify-OPTFLAGS-for-loongarch64.patch @@ -0,0 +1,41 @@ +From 5b0ad487a46a47784f1d830b4717dcf2aec1854d Mon Sep 17 00:00:00 2001 +From: zhangwenlong +Date: Thu, 23 Sep 2021 08:08:14 +0000 +Subject: [PATCH] modify OPTFLAGS for loongarch64 + +--- + Makefile.inc | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index 220009e..1472e4f 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -106,11 +106,19 @@ ifndef RPM_OPT_FLAGS + else + OPTFLAGS = $(RPM_OPT_FLAGS) + endif +-OPTFLAGS += -Werror -Wextra -Wstrict-prototypes -Wformat=2 \ +- -Werror=implicit-int -Werror=implicit-function-declaration \ +- $(WNOCLOBBERED) \ +- -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \ +- --param=ssp-buffer-size=4 ++ifeq ($(shell uname -m),loongarch64) ++ OPTFLAGS += -Wextra -Wstrict-prototypes -Wformat=2 \ ++ -Werror=implicit-int -Werror=implicit-function-declaration \ ++ $(WNOCLOBBERED) \ ++ -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \ ++ --param=ssp-buffer-size=4 ++else ++ OPTFLAGS += -Werror -Wextra -Wstrict-prototypes -Wformat=2 \ ++ -Werror=implicit-int -Werror=implicit-function-declaration \ ++ $(WNOCLOBBERED) \ ++ -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \ ++ --param=ssp-buffer-size=4 ++endif + + CFLAGS := $(OPTFLAGS) -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \ + -MMD -MP $(CFLAGS) +-- +2.27.0 + diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index 9493d5e..cb44f39 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,7 +1,8 @@ +%define anolis_release .0.1 Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.8.4 -Release: 22%{?dist}.2 +Release: 22%{anolis_release}%{?dist}.2 License: GPLv2 Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ @@ -104,6 +105,8 @@ Patch00090: 0090-RH-add-support-to-mpathconf-for-setting-arbitrary-de.patch Patch00091: 0091-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch Patch00092: 0092-multipathd-ignore-duplicated-multipathd-command-keys.patch +Patch00100: 0001-modify-OPTFLAGS-for-loongarch64.patch + # runtime Requires: %{name}-libs = %{version}-%{release} Requires: kpartx = %{version}-%{release} @@ -304,6 +307,9 @@ fi %{_pkgconfdir}/libdmmp.pc %changelog +* Fri Oct 28 2022 zhangwenlong 0.8.4-22.0.1.2 +- Add loongarch64 support for device-mapper-multipath + * Thu Oct 13 2022 Benjamin Marzinski 0.8.4-22.2 - Add 0092-multipathd-ignore-duplicated-multipathd-command-keys.patch - Resolves: bz #2133994 -- Gitee