Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
19b8b83dc0
!29 Fix secure compile option error in Makefile
From: @ni-yingjun 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2024-07-24 04:22:59 +00:00
Yingjun Ni
c08f6aa0d6 Fix secure compile option error in Makefile
dtc rpm包会生成dtc bin和libfdt.so,-fPIE不作用于libfdt.so,其他应用(如qemu)调用libfdt.so时会出现段错误,使用-fPIC代替-fPIE。
2024-07-18 11:21:54 +08:00
openeuler-ci-bot
6228946dca
!26 支持 clang 构建,移除 CFLAGS 中的 linker 选项
From: @dillon_chen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2023-07-14 09:39:00 +00:00
dillon_chen
b2bfb30dd2 add clang build 2023-07-14 17:12:26 +08:00
openeuler-ci-bot
9e2032315a
!25 update to 1.7.0
From: @dillon_chen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2023-07-14 08:37:41 +00:00
陈棋德
2977fdc6b0
update dtc.spec.
Signed-off-by: 陈棋德 <dillon.chen@gmail.com>
2023-07-14 05:45:14 +00:00
陈棋德
e023f32880
update dtc.spec.
Signed-off-by: 陈棋德 <dillon.chen@gmail.com>
2023-07-14 04:52:52 +00:00
陈棋德
b5aaf392a4
update dtc.spec.
Signed-off-by: 陈棋德 <dillon.chen@gmail.com>
2023-07-14 04:24:30 +00:00
dillon_chen
b6ca5eefc4 update to 1.7.0 2023-07-14 12:08:58 +08:00
openeuler-ci-bot
590922abc0
!18 enable make check
From: @fly_fzc 
Reviewed-by: @gaoruoshu 
Signed-off-by: @gaoruoshu
2023-05-30 01:49:00 +00:00
fly_fzc
7a5c109a05 enable make check 2023-05-25 17:40:55 +08:00
6 changed files with 81 additions and 5 deletions

Binary file not shown.

BIN
dtc-1.7.0.tar.xz Normal file

Binary file not shown.

View File

@ -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

View 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

View File

@ -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

View 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