summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorOleksiy Obitotskyy <oobitots@cisco.com>2021-01-22 03:52:50 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-05 23:37:03 +0000
commit50e4d05796234eebe6fd747f7cd08c998f4dadb0 (patch)
treed4dfe773a7941a1839df38a47de9723b65222585 /meta/recipes-kernel
parent2e07b7d3829a3013afad04db7a3a28ab31cdeef6 (diff)
downloadpoky-50e4d05796234eebe6fd747f7cd08c998f4dadb0.tar.gz
dtc: improve reproducibility
Makefile override CFLAGS, so -fmacro/debug-prefix-map optiions was omitted and binaries contains absolute patch to sources. (From OE-Core rev: 9cc6506b228982dc619080a24e70daf0cfaf16ab) Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b58e808a087bbc0a5abd78fd34bb6f1c0c93ba25) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/dtc/dtc.inc2
-rw-r--r--meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch36
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
index 0650e3c82e..5da6c24fbf 100644
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ b/meta/recipes-kernel/dtc/dtc.inc
@@ -7,7 +7,9 @@ DEPENDS = "flex-native bison-native"
7 7
8SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \ 8SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
9 file://make_install.patch \ 9 file://make_install.patch \
10 file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \
10 " 11 "
12
11UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" 13UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
12 14
13EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"' 15EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
diff --git a/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch b/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
new file mode 100644
index 0000000000..a2deb12d4b
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
@@ -0,0 +1,36 @@
1From f0119060ef1b9bd80e2cae487df1e4aedffb0e9b Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Fri, 22 Jan 2021 09:12:48 +0200
4Subject: [PATCH] dtc: Fix Makefile to add CFLAGS not override
5
6Makefile override CFLAGS not extend them, so some of them
7missing. Sources builds out of kernel tree and probably not all
8options could be used (?). We need at least -fmacro-prefix-map/
9debug-prefix-map to eliminate absolute path in binaries.
10
11Upstream-Status: Pending
12Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
13---
14 Makefile | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/Makefile b/Makefile
18index 35d936f..b5b13cf 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -20,10 +20,10 @@ CONFIG_LOCALVERSION =
22 # See libfdt_internal.h for details
23 ASSUME_MASK ?= 0
24
25-CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
26+CPPFLAGS += -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
27 WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
28 -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
29-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
30+CFLAGS += -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
31
32 BISON = bison
33 LEX = flex
34--
352.25.1
36