From 8cd1872e30341fdfb8458319bf7536d5642ec2c7 Mon Sep 17 00:00:00 2001 From: jammyjellyfish Date: Wed, 10 May 2023 17:29:36 +0800 Subject: [PATCH] split cflags and ldflags --- split-cflags-and-ldflags.patch | 12 ++++++++++++ vmtop.spec | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 split-cflags-and-ldflags.patch diff --git a/split-cflags-and-ldflags.patch b/split-cflags-and-ldflags.patch new file mode 100644 index 0000000..afa585e --- /dev/null +++ b/split-cflags-and-ldflags.patch @@ -0,0 +1,12 @@ +diff -up a/configure.ac b/configure.ac +--- a/configure.ac 2023-05-10 17:05:04.469300926 +0800 ++++ b/configure.ac 2023-05-10 17:14:45.487297380 +0800 +@@ -36,7 +36,7 @@ AC_ARG_ENABLE([debug], + + AC_ARG_ENABLE([secure-build], + [AS_HELP_STRING([--enable-secure-build], [build project with secure flags])], +- [CFLAGS="${CFLAGS} -Wl,-z,relro,-z,now -fPIE -fPIC -pie -Werror -Wall -ftrapv -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2"],[] ++ [CFLAGS="${CFLAGS} -fPIE -fPIC -Werror -Wall -ftrapv -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2" LDFLAGS="${LDFLAGS} -Wl,-z,relro,-z,now -pie"],[] + ) + + AC_CONFIG_FILES([Makefile diff --git a/vmtop.spec b/vmtop.spec index ce2b7f7..26b8811 100644 --- a/vmtop.spec +++ b/vmtop.spec @@ -1,6 +1,6 @@ Name: vmtop Version: 1.1 -Release: 7 +Release: 8 Summary: A tool for collecting and analyzing data of virtual machine License: MulanPSL-2.0 Group: Application/System @@ -39,6 +39,7 @@ Patch0028: proc-del-unused-items-getting-from-proc-stat-refresh.patch Patch0029: proc-del-loop-sscanf-for-proc-pid-stat-file.patch Patch0030: utils-del-realpath-from-read_file.patch Patch0031: add-README.zh.md.-update-README.md.patch +Patch0032: split-cflags-and-ldflags.patch Requires: libvirt, ncurses @@ -72,13 +73,16 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}/usr/bin -install -m 550 vmtop ${RPM_BUILD_ROOT}/usr/bin/%{name} +install -m 750 vmtop ${RPM_BUILD_ROOT}/usr/bin/%{name} %files %license License/LICENSE %{_bindir}/vmtop %changelog +* Wed May 10 2023 jammyjellyfish - 1.1-8 +- split cflags and ldflags + * Sun Oct 09 2022 fushanqing - 1.1-7 - Unified license name specification -- Gitee