Skip to content

Commit

Permalink
tests: add "include-fixed" GCC directory to include directories
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
diabonas committed Sep 9, 2021
1 parent 69b7bbf commit 447148f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CFLAGS = $(OPTIMIZATIONS) -std=gnu11 \
-Iinclude -iquote . \
-isystem /usr/include \
-isystem $(shell $(CC) $(ARCH_CFLAGS) -print-file-name=include) \
-isystem $(shell $(CC) $(ARCH_CFLAGS) -print-file-name=include-fixed) \
$(ARCH_CFLAGS) \
$(CFLAGS_LTO) \
$(CFLAGS_GCOV) \
Expand Down

0 comments on commit 447148f

Please sign in to comment.