diff --git a/0001-fix-missing-fstack-protector-strong.patch b/0001-fix-missing-fstack-protector-strong.patch new file mode 100644 index 0000000..37bf0fc --- /dev/null +++ b/0001-fix-missing-fstack-protector-strong.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile b/Makefile +index 089b621..3665e0f 100644 +--- a/Makefile ++++ b/Makefile +@@ -113,7 +113,7 @@ INCLUDES = -I. -I $(srctree)/include $(CONFIG_INCLUDES) + ifdef EXTRA_CFLAGS + CFLAGS := $(EXTRA_CFLAGS) + else +- CFLAGS := -g -Wall ++ CFLAGS := -g -Wall -fstack-protector-strong + endif + + LIBS = -ldl +diff --git a/plugins/Makefile b/plugins/Makefile +index b60352d..d5744a9 100644 +--- a/plugins/Makefile ++++ b/plugins/Makefile +@@ -75,7 +75,7 @@ INCLUDES = -I. -I.. -I../src -I $(srctree)/include $(CONFIG_INCLUDES) + ifdef EXTRA_CFLAGS + CFLAGS := $(EXTRA_CFLAGS) + else +- CFLAGS := -g -Wall ++ CFLAGS := -g -Wall -fstack-protector-strong + endif + + # Append required CFLAGS diff --git a/libtraceevent.spec b/libtraceevent.spec index ec9ee27..710d7df 100644 --- a/libtraceevent.spec +++ b/libtraceevent.spec @@ -1,11 +1,14 @@ Name: libtraceevent Version: 1.2.1 -Release: 1 +Release: 2 License: LGPLv2+ and GPLv2+ Summary: Library to parse raw trace event formats URL: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-%{version}.tar.gz + +Patch0000: 0001-fix-missing-fstack-protector-strong.patch + BuildRequires: gcc BuildRequires: xmlto BuildRequires: asciidoc @@ -23,7 +26,7 @@ Requires: %{name}%{_isa} = %{version}-%{release} Development headers of %{name}-libs %prep -%setup -q +%autosetup -n %{name}-%{version} -p1 %build MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl` @@ -51,6 +54,9 @@ rm -rf %{buildroot}/%{_libdir}/libtraceevent.a %{_libdir}/pkgconfig/libtraceevent.pc %changelog +* Mon Dec 05 2022 xu_ping - 1.2.1-2 +- Add -fstack-protector-strong compile options + * Fri Jan 14 2022 houyingchao - 1.2.1-1 - Init package