]>
Commit | Line | Data |
---|---|---|
84d9f457 SM |
1 | PR submitted at https://github.com/rhboot/shim/pull/466 |
2 | ||
3 | commit 5ebbaf70ab4332d11a4f03f5b178e8055ba8cbce | |
4 | Author: Steve McIntyre <steve@einval.com> | |
5 | Date: Thu Apr 28 12:32:18 2022 +0100 | |
6 | ||
7 | tests: also look for system headers in multi-arch directories | |
8 | ||
9 | On Debian(-derived) systems low-level system headers are under | |
10 | /usr/include/<multi-arch path>, so look there too. | |
11 | ||
12 | Otherwise we see stuff like: | |
13 | ||
14 | gcc -O2 -fno-diagnostics-color -ggdb -std=gnu11 -isystem <foo>/shim.git/include/system -I<foo>/shim.git/gnu-efi/inc -I<foo>/shim.git/gnu-efi/inc/ia32 -I<foo>/shim.git/gnu-efi/inc/protocol -Iinclude -iquote . -isystem /usr/include -isystem /usr/lib/gcc/i686-linux-gnu/11/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -DMDE_CPU_IA32 -DPAGE_SIZE=4096 -fshort-wchar -fno-builtin -rdynamic -fno-inline -fno-eliminate-unused-debug-types -fno-eliminate-unused-debug-symbols -gpubnames -grecord-gcc-switches -Wall -Wextra -Wno-missing-field-initializers -Wsign-compare -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-unused-variable -Wno-pointer-sign -Werror -Werror=nonnull -Werror=nonnull-compare -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -DPAGE_SIZE=4096 -DSHIM_UNIT_TEST -DDEFAULT_DEBUG_PRINT_STATE=0 -isystem include-fixed -o test-csv csv.c test-csv.c test.c libefi-test.a -lefivar | |
15 | In file included from /usr/include/bits/errno.h:26, | |
16 | from /usr/include/errno.h:28, | |
17 | from /usr/include/efivar/efivar.h:24, | |
18 | from include/test.h:51, | |
19 | from shim.h:68, | |
20 | from csv.c:6: | |
21 | /usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or directory | |
22 | 1 | #include <asm/errno.h> | |
23 | | ^~~~~~~~~~~~~ | |
24 | compilation terminated. | |
25 | In file included from /usr/include/bits/errno.h:26, | |
26 | from /usr/include/errno.h:28, | |
27 | from /usr/include/efivar/efivar.h:24, | |
28 | from include/test.h:51, | |
29 | from shim.h:68, | |
30 | from test-csv.c:9: | |
31 | /usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or directory | |
32 | 1 | #include <asm/errno.h> | |
33 | | ^~~~~~~~~~~~~ | |
34 | compilation terminated. | |
35 | In file included from /usr/include/bits/errno.h:26, | |
36 | from /usr/include/errno.h:28, | |
37 | from /usr/include/efivar/efivar.h:24, | |
38 | from include/test.h:51, | |
39 | from shim.h:68, | |
40 | from test.c:7: | |
41 | /usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or directory | |
42 | 1 | #include <asm/errno.h> | |
43 | | ^~~~~~~~~~~~~ | |
44 | compilation terminated. | |
45 | ||
46 | Signed-off-by: Steve McIntyre <steve@einval.com> | |
47 | ||
edae7563 SM |
48 | diff --git a/include/test.mk b/include/test.mk |
49 | index 1a4fc220..e965c600 100644 | |
50 | --- a/include/test.mk | |
51 | +++ b/include/test.mk | |
52 | @@ -50,6 +50,9 @@ CFLAGS = $(OPTIMIZATIONS) -std=gnu11 \ | |
53 | # of the "include" directory | |
54 | CFLAGS += -isystem $(shell $(CC) $(ARCH_CFLAGS) -print-file-name=include-fixed) | |
55 | ||
56 | +# And on Debian also check the multi-arch include path | |
57 | +CFLAGS += -isystem /usr/include/$(shell $(CC) $(ARCH_CFLAGS) -print-multiarch) | |
58 | + | |
59 | export CFLAGS_LTO CFLAGS_GCOV | |
60 | ||
61 | libefi-test.a : |