diff --git a/dtc.spec b/dtc.spec index a44b3d73a794f847e19363f44d26864c91d56967..ae9e997f9ac8d7843be57766fa51ffa26d703442 100644 --- a/dtc.spec +++ b/dtc.spec @@ -2,7 +2,7 @@ Name: dtc Version: 1.7.0 -Release: 2 +Release: 3 Summary: Device tree compiler License: GPLv2+ URL: https://devicetree.org/ @@ -16,6 +16,10 @@ Obsoletes: libfdt Patch1: openEuler-add-secure-compile-option-in-Makefile.patch Patch2: remove-ldflags-in-cflags.patch +%ifarch ppc64le +Patch3: fix-secure-compile-option-error-in-Makefile.patch +%endif + %description The devicetree is a data structure for describing hardware. Rather than hard coding every detail of a device into an operating system, many aspects of the hardware can @@ -92,6 +96,9 @@ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %doc Documentation/manual.txt %changelog +* Thu Jul 18 2024 yingjun ni - 1.7.0-3 +- fix secure compile option error in Makefile + * Fri Jul 14 2023 dillon chen - 1.7.0-2 - add clang build from jammyjellyfish PR diff --git a/fix-secure-compile-option-error-in-Makefile.patch b/fix-secure-compile-option-error-in-Makefile.patch new file mode 100644 index 0000000000000000000000000000000000000000..7a093defa03ee4b5294778fd0405a4980fef3369 --- /dev/null +++ b/fix-secure-compile-option-error-in-Makefile.patch @@ -0,0 +1,29 @@ +From de1f376fd21c7a8f46d67597fca57cfd2be66cd8 Mon Sep 17 00:00:00 2001 +From: Yingjun Ni +Date: Thu, 18 Jul 2024 10:40:34 +0800 +Subject: [PATCH] Fix secure compile option error in Makefile. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +dtc rpm包会生成dtc bin和libfdt.so,-fPIE不作用于libfdt.so,其他应用(如qemu)调用libfdt.so时会出现段错误,使用-fPIC代替-fPIE。 +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 5ef6edd..d2124da 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,7 +20,7 @@ CONFIG_LOCALVERSION = + # See libfdt_internal.h for details + ASSUME_MASK ?= 0 + +-EXTRA_CFLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE ++EXTRA_CFLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIC + LDFLAGS += -Wl,-z,now -pie + CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK) + WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wsign-compare \ +-- +2.43.0 +