summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-07-09 09:39:58 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-10 09:56:22 +0100
commitb184dfe4af6b8c56b7182cd1c463f74657892dcb (patch)
tree16d6cec4774369bf054ead53f8394d394d96c1d4 /meta/recipes-bsp
parent7bd06c53abca0c7dead74b0c160f05bdafdab8fb (diff)
downloadpoky-b184dfe4af6b8c56b7182cd1c463f74657892dcb.tar.gz
efibootmgr: Pass correct flags to compiler from pkg-config
efivar.h is in usr/include/efirvar directory so it should be added to include search path via -I to compiler cmdline to fix make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'. Stop. | make[1]: *** Waiting for unfinished jobs.... When running clang to generate dependencies -MM -MG -MF it still parses the compile unit and complains if certain header is not found where as gcc does not do that, hence the compile error is only seen when compiling with clang. (From OE-Core rev: db4fa7e765cb434119d816d86b943eeb62235601) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch83
-rw-r--r--meta/recipes-bsp/efibootmgr/efibootmgr_17.bb1
2 files changed, 84 insertions, 0 deletions
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch
new file mode 100644
index 0000000000..9525ed8c54
--- /dev/null
+++ b/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch
@@ -0,0 +1,83 @@
1From 97668ae0bce776a36ea2001dea63d376be8274ac Mon Sep 17 00:00:00 2001
2From: Peter Jones <pjones@redhat.com>
3Date: Wed, 6 Mar 2019 13:08:33 -0500
4Subject: [PATCH] Make sure PKGS= is propogated into the submake for "make
5 deps"
6
7When we're doing make deps with "$(CC) -MF", gcc and clang have different
8behavior, both broken in different ways, which we're hitting because of a
9missing -I argument for libefivar's includes. On clang, when a header can't
10be found, it emits a rule with the header as a prerequisite without a path,
11such as efivar.h here:
12
13efibootmgr.o: efibootmgr.c fix_coverity.h efivar.h efiboot.h \
14 /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
15 /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
16 /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
17 /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
18 error.h
19
20Then the build that utilizes that rule will fail to find the
21prerequisite and tell you something like:
22
23make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'. Stop.
24make[1]: Leaving directory '/home/pjones/devel/github.com/efibootmgr/master/src'
25
26With gcc, when a header can't be found, it emits a rule without that header
27as a prerequisite, as such (again with efivar.h):
28
29efibootmgr.o: efibootmgr.c fix_coverity.h \
30 /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
31 /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
32 /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
33 /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
34 /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
35 error.h
36
37And then your build will fail if you haven't adjusted CFLAGS to tell it
38where to find the header.
39
40Both of these would be better just erroring, but at least gcc's doesn't
41insert a *wrong* dependency.
42
43This patch adds "PKGS=efivar efibootmgr popt" for all deps under src/.
44Technically that's overkill, as efibootmgr itself doesn't need popt, but it
45doesn't hurt anything to have the extra part there. The resulting
46.efibootmgr.d file has the prerequisites expressed correctly:
47
48efibootmgr.o: efibootmgr.c fix_coverity.h /usr/include/efivar/efivar.h \
49 /usr/include/efivar/efiboot.h \
50 /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
51 /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
52 /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
53 /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
54 /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
55 error.h
56
57This fixes the issue described in github PR #96
58
59Signed-off-by: Peter Jones <pjones@redhat.com>
60Upstream-Status: Backport [https://github.com/rhboot/efibootmgr/commit/97668ae0bce776a36ea2001dea63d376be8274ac]
61---
62 src/Makefile | 7 ++++++-
63 1 file changed, 6 insertions(+), 1 deletion(-)
64
65diff --git a/src/Makefile b/src/Makefile
66index 258bac1..32fa188 100644
67--- a/src/Makefile
68+++ b/src/Makefile
69@@ -31,8 +31,13 @@ efibootdump : PKGS=efivar efiboot popt
70 efibootnext : $(call objects-of,$(EFIBOOTNEXT_SOURCES))
71 efibootnext : PKGS=efivar efiboot popt
72
73+deps : PKGS=efivar efiboot popt
74 deps : $(ALL_SOURCES)
75- $(MAKE) -f $(TOPDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)"
76+ $(MAKE) -f $(TOPDIR)/Make.deps \
77+ SOURCES="$(ALL_SOURCES)" \
78+ SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" \
79+ PKGS="$(PKGS)" \
80+ deps
81
82 clean :
83 @rm -rfv *.o *.a *.so $(TARGETS)
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb b/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
index 0e5a81e316..5d6f200a73 100644
--- a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
+++ b/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
@@ -12,6 +12,7 @@ COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
12 12
13SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \ 13SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \
14 file://0001-remove-extra-decl.patch \ 14 file://0001-remove-extra-decl.patch \
15 file://97668ae0bce776a36ea2001dea63d376be8274ac.patch \
15 " 16 "
16SRCREV = "e067160ecef8208e1944002e5d50b275733211fb" 17SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
17 18