diff --git a/dtc.spec b/dtc.spec index d38bdbc..ccbb722 100644 --- a/dtc.spec +++ b/dtc.spec @@ -2,7 +2,7 @@ Name: dtc Version: 1.6.0 -Release: 2 +Release: 3 Summary: Device tree compiler License: GPLv2+ URL: https://devicetree.org/ @@ -13,6 +13,8 @@ BuildRequires: python3-devel python3-setuptools Provides: libfdt Obsoletes: libfdt +Patch1: openEuler-add-secure-compile-option-in-Makefile.patch + %description The devicetree is a data structure for describing hardware. Rather than hard coding @@ -78,6 +80,12 @@ make install DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \ %doc Documentation/manual.txt %changelog +* Sat Mar 20 2021 shenyangyang - 1.6.0-3 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:Add secure compile option in Makefile + * Wed Sep 9 2020 wangchen - 1.6.0-2 - Type:enhancement - ID:NA diff --git a/openEuler-add-secure-compile-option-in-Makefile.patch b/openEuler-add-secure-compile-option-in-Makefile.patch new file mode 100644 index 0000000..79997bf --- /dev/null +++ b/openEuler-add-secure-compile-option-in-Makefile.patch @@ -0,0 +1,25 @@ +From 1c3f9fea2f808ae9eb481bc344ff589b42a106a7 Mon Sep 17 00:00:00 2001 +From: Yangyang Shen +Date: Sat, 20 Mar 2021 16:40:13 +0800 +Subject: [PATCH] openEuler add secure compile option in Makefile + +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index f02aa19..a37a2db 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,6 +20,8 @@ CONFIG_LOCALVERSION = + # See libfdt_internal.h for details + ASSUME_MASK ?= 0 + ++EXTRA_CFLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wl,-z,now -fPIE ++LDFLAGS += -Wl,-z,now -pie + CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK) + WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow +-- +2.23.0 +