From 63e382ae6afbcfbce6d820082ae29b3bdd4e0197 Mon Sep 17 00:00:00 2001 From: panzhe0328 Date: Mon, 3 Nov 2025 17:10:25 +0800 Subject: [PATCH] Modify the optimization level to be compatible with the GCC upgrade --- dtc.spec | 6 +++++- modify-the-optimization-level.patch | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 modify-the-optimization-level.patch diff --git a/dtc.spec b/dtc.spec index 28f7ef9..38db876 100644 --- a/dtc.spec +++ b/dtc.spec @@ -2,7 +2,7 @@ Name: dtc Version: 1.7.0 -Release: 4 +Release: 5 Summary: Device tree compiler License: GPLv2+ URL: https://devicetree.org/ @@ -19,6 +19,7 @@ Patch2: remove-ldflags-in-cflags.patch %ifarch ppc64le Patch3: fix-secure-compile-option-error-in-Makefile.patch %endif +Patch4: modify-the-optimization-level.patch %description The devicetree is a data structure for describing hardware. Rather than hard coding @@ -96,6 +97,9 @@ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %doc Documentation/manual.txt %changelog +* Mon Nov 03 2025 panzhe - 1.7.0-5 +- Modify the optimization level to be compatible with the GCC upgrade + * Mon Aug 25 2025 wangjiang - 1.7.0-4 - fix changelog diff --git a/modify-the-optimization-level.patch b/modify-the-optimization-level.patch new file mode 100644 index 0000000..4da0966 --- /dev/null +++ b/modify-the-optimization-level.patch @@ -0,0 +1,25 @@ +From ab38648f3a3d15eb26e0616db998f00b95fbddfe Mon Sep 17 00:00:00 2001 +From: panzhe +Date: Mon, 3 Nov 2025 16:27:12 +0800 +Subject: [PATCH] Modify the optimization level + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 5ef6edd..d697613 100644 +--- a/Makefile ++++ b/Makefile +@@ -25,7 +25,7 @@ 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 -O2 $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS) + + BISON = bison + LEX = flex +-- +2.33.0 + -- Gitee