summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Witschel <diabonas@archlinux.org>2021-09-09 17:53:45 +0200
committerPeter Jones <pjones@redhat.com>2021-09-10 16:06:22 -0400
commitc1a84dc0a695782e55a97173e4f9f8a98432f9e1 (patch)
tree18f37c509688a8272c1b400499126964c90374fb
parent69b7bbfc955b12698963a331644833d5ce9fc598 (diff)
downloadefi-boot-shim-c1a84dc0a695782e55a97173e4f9f8a98432f9e1.tar.gz
efi-boot-shim-c1a84dc0a695782e55a97173e4f9f8a98432f9e1.zip
tests: add "include-fixed" GCC directory to include directories
On Arch Linux, the GCC version of "limits.h" is in the "include-fixed" instead of the "include" directory. It needs to be included in the include directories list, otherwise attempting to compile the test suite fails with the following error: In file included from /usr/include/efivar/efivar-dp.h:22, from /usr/include/efivar/efivar.h:238, from include/test.h:51, from shim.h:68, from csv.c:6: /usr/include/limits.h:124:16: fatal error: limits.h: No such file or directory 124 | # include_next <limits.h> | ^~~~~~~~~~ compilation terminated.
-rw-r--r--include/test.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/test.mk b/include/test.mk
index 343053d3..1a4fc220 100644
--- a/include/test.mk
+++ b/include/test.mk
@@ -46,6 +46,10 @@ CFLAGS = $(OPTIMIZATIONS) -std=gnu11 \
-DSHIM_UNIT_TEST \
"-DDEFAULT_DEBUG_PRINT_STATE=$(DEBUG_PRINTS)"
+# On some systems (e.g. Arch Linux), limits.h is in the "include-fixed" instead
+# of the "include" directory
+CFLAGS += -isystem $(shell $(CC) $(ARCH_CFLAGS) -print-file-name=include-fixed)
+
export CFLAGS_LTO CFLAGS_GCOV
libefi-test.a :