Add -fstack-protector-stroong compile options
Signed-off-by: cherry530 <xuping33@huawei.com> (cherry picked from commit a53b9562c12d55fcd960531acbb455baab805bd6)
This commit is contained in:
parent
746f9e7549
commit
da24ad79a1
26
0001-fix-missing-fstack-protector-strong.patch
Normal file
26
0001-fix-missing-fstack-protector-strong.patch
Normal file
@ -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
|
||||||
@ -1,11 +1,14 @@
|
|||||||
Name: libtraceevent
|
Name: libtraceevent
|
||||||
Version: 1.2.1
|
Version: 1.2.1
|
||||||
Release: 1
|
Release: 2
|
||||||
License: LGPLv2+ and GPLv2+
|
License: LGPLv2+ and GPLv2+
|
||||||
Summary: Library to parse raw trace event formats
|
Summary: Library to parse raw trace event formats
|
||||||
|
|
||||||
URL: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
|
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
|
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: gcc
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
@ -23,7 +26,7 @@ Requires: %{name}%{_isa} = %{version}-%{release}
|
|||||||
Development headers of %{name}-libs
|
Development headers of %{name}-libs
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
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
|
%{_libdir}/pkgconfig/libtraceevent.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 05 2022 xu_ping <xuping33@h-partners.com> - 1.2.1-2
|
||||||
|
- Add -fstack-protector-strong compile options
|
||||||
|
|
||||||
* Fri Jan 14 2022 houyingchao <houyingchao@huawei.com> - 1.2.1-1
|
* Fri Jan 14 2022 houyingchao <houyingchao@huawei.com> - 1.2.1-1
|
||||||
- Init package
|
- Init package
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user