Fix secure compile option error in Makefile
dtc rpm包会生成dtc bin和libfdt.so,-fPIE不作用于libfdt.so,其他应用(如qemu)调用libfdt.so时会出现段错误,使用-fPIC代替-fPIE。
This commit is contained in:
parent
6228946dca
commit
c08f6aa0d6
9
dtc.spec
9
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 <yingjun.ni@shingroup.cn> - 1.7.0-3
|
||||
- fix secure compile option error in Makefile
|
||||
|
||||
* Fri Jul 14 2023 dillon chen <dillon.chen@gmail.com> - 1.7.0-2
|
||||
- add clang build from jammyjellyfish PR
|
||||
|
||||
|
||||
29
fix-secure-compile-option-error-in-Makefile.patch
Normal file
29
fix-secure-compile-option-error-in-Makefile.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From de1f376fd21c7a8f46d67597fca57cfd2be66cd8 Mon Sep 17 00:00:00 2001
|
||||
From: Yingjun Ni <yingjun.ni@shingroup.cn>
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user