Compare commits
11 Commits
b094215e99
...
19b8b83dc0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19b8b83dc0 | ||
|
|
c08f6aa0d6 | ||
|
|
6228946dca | ||
|
|
b2bfb30dd2 | ||
|
|
9e2032315a | ||
|
|
2977fdc6b0 | ||
|
|
e023f32880 | ||
|
|
b5aaf392a4 | ||
|
|
b6ca5eefc4 | ||
|
|
590922abc0 | ||
|
|
7a5c109a05 |
BIN
dtc-1.6.1.tar.xz
BIN
dtc-1.6.1.tar.xz
Binary file not shown.
BIN
dtc-1.7.0.tar.xz
Normal file
BIN
dtc-1.7.0.tar.xz
Normal file
Binary file not shown.
36
dtc.spec
36
dtc.spec
@ -1,20 +1,24 @@
|
||||
%define _wrong_version_format_terminate_build 0
|
||||
|
||||
Name: dtc
|
||||
Version: 1.6.1
|
||||
Release: 2
|
||||
Version: 1.7.0
|
||||
Release: 3
|
||||
Summary: Device tree compiler
|
||||
License: GPLv2+
|
||||
URL: https://devicetree.org/
|
||||
Source0: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
|
||||
|
||||
BuildRequires: gcc make flex bison swig
|
||||
BuildRequires: python3-devel python3-setuptools
|
||||
BuildRequires: python3-devel python3-setuptools python3-setuptools_scm python3-pip python3-wheel
|
||||
Provides: libfdt
|
||||
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
|
||||
@ -47,12 +51,25 @@ This package provides python3 bindings for libfdt
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
||||
%if "%toolchain" == "clang"
|
||||
CFLAGS="$CFLAGS -Wno-error=cast-qual -Wno-error=missing-prototypes -Wno-error=unused-command-line-argument"
|
||||
%endif
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
||||
%if "%toolchain" == "clang"
|
||||
CFLAGS="$CFLAGS -Wno-error=cast-qual -Wno-error=missing-prototypes -Wno-error=unused-command-line-argument"
|
||||
%endif
|
||||
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \
|
||||
LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} V=1
|
||||
|
||||
%check
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
||||
%make_build check
|
||||
|
||||
%pre
|
||||
|
||||
%preun
|
||||
@ -62,7 +79,6 @@ make install DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \
|
||||
%postun
|
||||
|
||||
%files
|
||||
%doc README
|
||||
%license GPL README.license
|
||||
%{_bindir}/*
|
||||
%{_libdir}/libfdt-%{version}.so
|
||||
@ -80,6 +96,18 @@ make install DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \
|
||||
%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
|
||||
|
||||
* Fri Jul 14 2023 dillon chen <dillon.chen@gmail.com> - 1.7.0-1
|
||||
- update version to 1.7.0
|
||||
|
||||
* Thu May 25 2023 fuanan <fuanan3@h-partners.com> - 1.6.1-3
|
||||
- enable make check
|
||||
|
||||
* Wed Oct 26 2022 yanglongkang<yanglongkang@h-partners.com> - 1.6.1-2
|
||||
- rebuild for next release
|
||||
|
||||
|
||||
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
|
||||
|
||||
@ -18,7 +18,7 @@ index f02aa19..a37a2db 100644
|
||||
+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 \
|
||||
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wsign-compare \
|
||||
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
|
||||
--
|
||||
2.23.0
|
||||
|
||||
19
remove-ldflags-in-cflags.patch
Normal file
19
remove-ldflags-in-cflags.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -up dtc-1.7.0/Makefile.orig2 dtc-1.7.0/Makefile
|
||||
--- dtc-1.7.0/Makefile.orig2 2023-04-21 18:28:46.693701292 +0800
|
||||
+++ dtc-1.7.0/Makefile 2023-04-21 18:28:58.425735633 +0800
|
||||
@@ -20,12 +20,12 @@ CONFIG_LOCALVERSION =
|
||||
# See libfdt_internal.h for details
|
||||
ASSUME_MASK ?= 0
|
||||
|
||||
-EXTRA_CFLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wl,-z,now -fPIE
|
||||
+EXTRA_CFLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE
|
||||
LDFLAGS += -Wl,-z,now -pie
|
||||
CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
|
||||
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wsign-compare \
|
||||
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
|
||||
-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
|
||||
+CFLAGS += -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
|
||||
|
||||
BISON = bison
|
||||
LEX = flex
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user