diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-07-23 14:29:46 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-07-28 12:23:15 -0700 |
commit | f16aa16e917ea440daa3d5bd136338f66a964f5c (patch) | |
tree | 022e161ef1d6bf435cc867cd2a669c4a2e370178 | |
parent | 1fb6be67b43f16ff48df7a719b1d89dd0c615870 (diff) | |
download | meta-openembedded-f16aa16e917ea440daa3d5bd136338f66a964f5c.tar.gz |
flashrom: Fix build failure with glibc 2.32
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom/0001-Makefile-Check-for-last-line-only-from-preprocessed-.patch | 57 | ||||
-rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb | 1 |
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 000000000..7a8be8374 --- /dev/null +++ b/meta-oe/recipes-bsp/flashrom/flashrom/0001-Makefile-Check-for-last-line-only-from-preprocessed-.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 3c078497e506bd6acb406da5cde7ce20e8896353 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 23 Jul 2020 14:13:59 -0700 | ||
4 | Subject: [PATCH] Makefile: Check for last line only from preprocessed output | ||
5 | |||
6 | This started to fail with glibc 2.32 since glibc added additional | ||
7 | attributes to functions in signal.h therefore existing regexp started to | ||
8 | fail as it is not able to handle these functions e.g. | ||
9 | |||
10 | extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__)) | ||
11 | __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead"))); | ||
12 | |||
13 | grep -v '^\#' | grep '"' | cut -f 2 -d'"' | ||
14 | bit outside of fd_set selected | ||
15 | Use sigaction with SA_RESTART instead | ||
16 | arm | ||
17 | |||
18 | So changing it to | ||
19 | tail -1 | grep '"' | cut -f 2 -d'"' | ||
20 | arm | ||
21 | |||
22 | Produces the expected result, this was hidden until now | ||
23 | |||
24 | Upstream-Status: Submitted [https://review.coreboot.org/c/flashrom/+/43770] | ||
25 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
26 | Change-Id: I123a046e142d54632f12d54e2aa09b0928c02b91 | ||
27 | --- | ||
28 | Makefile | 6 +++--- | ||
29 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
30 | |||
31 | diff --git a/Makefile b/Makefile | ||
32 | index 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 | -- | ||
56 | 2.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 642cec159..66ae34af9 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 | ||
8 | SRC_URI = "https://download.flashrom.org/releases/flashrom-v${PV}.tar.bz2 \ | 8 | SRC_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 | " |
11 | SRC_URI[md5sum] = "7f8e4b87087eb12ecee0fcc5445b4956" | 12 | SRC_URI[md5sum] = "7f8e4b87087eb12ecee0fcc5445b4956" |
12 | SRC_URI[sha256sum] = "e1f8d95881f5a4365dfe58776ce821dfcee0f138f75d0f44f8a3cd032d9ea42b" | 13 | SRC_URI[sha256sum] = "e1f8d95881f5a4365dfe58776ce821dfcee0f138f75d0f44f8a3cd032d9ea42b" |