From 159506624fa83f87fa8b6891053eabe81445776e Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Thu, 28 Mar 2024 09:51:39 +0800 Subject: [PATCH] support clang build --- 0004-support-clang-build.patch | 41 ++++++++++++++++++++++++++++++++++ vdo.spec | 6 ++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0004-support-clang-build.patch diff --git a/0004-support-clang-build.patch b/0004-support-clang-build.patch new file mode 100644 index 0000000..8fafd54 --- /dev/null +++ b/0004-support-clang-build.patch @@ -0,0 +1,41 @@ +From 9259d55e814b03bad2145db5429b37d12123b2a3 Mon Sep 17 00:00:00 2001 +From: luofeng +Date: Tue, 19 Mar 2024 21:29:11 +0800 +Subject: [PATCH] support clang build + +--- + utils/uds/Makefile | 3 ++- + utils/vdo/Makefile | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/utils/uds/Makefile b/utils/uds/Makefile +index c258d55..4a5409c 100644 +--- a/utils/uds/Makefile ++++ b/utils/uds/Makefile +@@ -59,7 +59,8 @@ GLOBAL_FLAGS = $(RPM_OPT_FLAGS) -D_GNU_SOURCE -g $(OPT_FLAGS) \ + $(WARNS) $(shell getconf LFS_CFLAGS) $(DEBUG_FLAGS) \ + -DCURRENT_VERSION='"$(BUILD_VERSION)"' \ + +-CFLAGS = $(GLOBAL_FLAGS) -I. -std=gnu99 -pedantic $(C_WARNS) $(MY_CFLAGS) ++CFLAGS ?= ++CFLAGS += $(GLOBAL_FLAGS) -I. -std=gnu99 -pedantic $(C_WARNS) $(MY_CFLAGS) + LDFLAGS = $(RPM_LD_FLAGS) $(MY_LDFLAGS) + + MY_FLAGS = +diff --git a/utils/vdo/Makefile b/utils/vdo/Makefile +index d8b32ce..71db064 100644 +--- a/utils/vdo/Makefile ++++ b/utils/vdo/Makefile +@@ -73,7 +73,8 @@ DEPDIR = .deps + MV = mv -f + + INCLUDES = -I. -I$(UDS_DIR) +-CFLAGS = -fPIC $(GLOBAL_CFLAGS) $(INCLUDES) -Wno-write-strings \ ++CFLAGS ?= ++CFLAGS += -fPIC $(GLOBAL_CFLAGS) $(INCLUDES) -Wno-write-strings \ + -DCURRENT_VERSION="\"$(VDO_VERSION)\"" + + LDFLAGS = $(GLOBAL_LDFLAGS) +-- +2.19.1 + diff --git a/vdo.spec b/vdo.spec index f1b1644..f243e80 100644 --- a/vdo.spec +++ b/vdo.spec @@ -1,6 +1,6 @@ Name: vdo Version: 8.2.2.2 -Release: 1 +Release: 2 Summary: Management tools for Virtual Data Optimizer License: GPLv2 URL: http://github.com/dm-vdo/vdo @@ -8,6 +8,7 @@ Source0: https://github.com/dm-vdo/vdo/archive/refs/tags/%{version}.tar.gz Patch0001: 0001-Add-loongarch64-support.patch Patch0002: 0002-fix_dmeventd_linking.patch Patch0003: 0003-RISC-V-support.patch +Patch0004: 0004-support-clang-build.patch BuildRequires: gcc libuuid-devel device-mapper-devel device-mapper-event-devel BuildRequires: valgrind-devel zlib-devel libblkid-devel @@ -51,6 +52,9 @@ This package provides the user-space management tools for VDO. %{_mandir}/man8/* %changelog +* Fri Mar 1 2024 luofeng - 8.2.2.2-2 +- support clang build + * Tue Feb 27 2024 liyanan - 8.2.2.2-1 - Upgrade to 8.2.2.2 -- Gitee