summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-07-23 14:29:46 -0700
committerArmin Kuster <akuster808@gmail.com>2020-07-30 21:25:51 -0700
commit40f4f3ed5f6f006c05f36f6dd846b788e1ec98fd (patch)
tree667ce9ce5512fadc982e2eedd426deadca6c47ab
parente227d95f2f8c7fde5959ee49441b23d7754b1853 (diff)
downloadmeta-openembedded-40f4f3ed5f6f006c05f36f6dd846b788e1ec98fd.tar.gz
flashrom: Fix build failure with glibc 2.32
Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit f16aa16e917ea440daa3d5bd136338f66a964f5c) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-bsp/flashrom/flashrom/0001-Makefile-Check-for-last-line-only-from-preprocessed-.patch57
-rw-r--r--meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb1
2 files changed, 58 insertions, 0 deletions
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom/0001-Makefile-Check-for-last-line-only-from-preprocessed-.patch b/meta-oe/recipes-bsp/flashrom/flashrom/0001-Makefile-Check-for-last-line-only-from-preprocessed-.patch
new file mode 100644
index 0000000000..7a8be83746
--- /dev/null
+++ b/meta-oe/recipes-bsp/flashrom/flashrom/0001-Makefile-Check-for-last-line-only-from-preprocessed-.patch
@@ -0,0 +1,57 @@
1From 3c078497e506bd6acb406da5cde7ce20e8896353 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 23 Jul 2020 14:13:59 -0700
4Subject: [PATCH] Makefile: Check for last line only from preprocessed output
5
6This started to fail with glibc 2.32 since glibc added additional
7attributes to functions in signal.h therefore existing regexp started to
8fail as it is not able to handle these functions e.g.
9
10extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__))
11 __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead")));
12
13grep -v '^\#' | grep '"' | cut -f 2 -d'"'
14bit outside of fd_set selected
15Use sigaction with SA_RESTART instead
16arm
17
18So changing it to
19tail -1 | grep '"' | cut -f 2 -d'"'
20arm
21
22Produces the expected result, this was hidden until now
23
24Upstream-Status: Submitted [https://review.coreboot.org/c/flashrom/+/43770]
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26Change-Id: I123a046e142d54632f12d54e2aa09b0928c02b91
27---
28 Makefile | 6 +++---
29 1 file changed, 3 insertions(+), 3 deletions(-)
30
31diff --git a/Makefile b/Makefile
32index 803529f..3795681 100644
33--- a/Makefile
34+++ b/Makefile
35@@ -106,7 +106,7 @@ endif
36 # IMPORTANT: The following line must be placed before TARGET_OS is ever used
37 # (of course), but should come after any lines setting CC because the line
38 # below uses CC itself.
39-override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"'))
40+override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null | tail -1 | grep '"' | cut -f 2 -d'"'))
41
42 ifeq ($(TARGET_OS), Darwin)
43 override CPPFLAGS += -I/opt/local/include -I/usr/local/include
44@@ -460,8 +460,8 @@ endif
45 # IMPORTANT: The following line must be placed before ARCH is ever used
46 # (of course), but should come after any lines setting CC because the line
47 # below uses CC itself.
48-override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"'))
49-override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null | grep -v '^\#'))
50+override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null | tail -1 | grep '"' | cut -f 2 -d'"'))
51+override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null | tail -1))
52
53 # Disable the internal programmer on unsupported architectures (everything but x86 and mipsel)
54 ifneq ($(ARCH)-little, $(filter $(ARCH),x86 mips)-$(ENDIAN))
55--
562.27.0
57
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb b/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb
index 642cec1598..66ae34af94 100644
--- a/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb
+++ b/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb
@@ -7,6 +7,7 @@ DEPENDS = "pciutils libusb libusb-compat"
7 7
8SRC_URI = "https://download.flashrom.org/releases/flashrom-v${PV}.tar.bz2 \ 8SRC_URI = "https://download.flashrom.org/releases/flashrom-v${PV}.tar.bz2 \
9 file://0001-typecast-enum-conversions-explicitly.patch \ 9 file://0001-typecast-enum-conversions-explicitly.patch \
10 file://0001-Makefile-Check-for-last-line-only-from-preprocessed-.patch \
10 " 11 "
11SRC_URI[md5sum] = "7f8e4b87087eb12ecee0fcc5445b4956" 12SRC_URI[md5sum] = "7f8e4b87087eb12ecee0fcc5445b4956"
12SRC_URI[sha256sum] = "e1f8d95881f5a4365dfe58776ce821dfcee0f138f75d0f44f8a3cd032d9ea42b" 13SRC_URI[sha256sum] = "e1f8d95881f5a4365dfe58776ce821dfcee0f138f75d0f44f8a3cd032d9ea42b"