1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00

Add SYS_INCLUDE_DIRS to top level Makefile.

Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem.

This allows a workaround for https://github.com/raspberrypi/pico-sdk/issues/2451 by
using system headers, which are more tolerant of macro redefinitions.
This commit is contained in:
Matthew Selby 2025-05-13 09:52:45 +01:00
parent 816700bc2d
commit 22738b6492

View file

@ -305,6 +305,7 @@ EXTRA_WARNING_FLAGS := -Wold-style-definition
CFLAGS += $(ARCH_FLAGS) \
$(addprefix -D,$(OPTIONS)) \
$(addprefix -I,$(INCLUDE_DIRS)) \
$(addprefix -isystem,$(SYS_INCLUDE_DIRS)) \
$(DEBUG_FLAGS) \
-std=gnu17 \
-Wall -Wextra -Werror -Wunsafe-loop-optimizations -Wdouble-promotion \
@ -331,6 +332,7 @@ ASFLAGS = $(ARCH_FLAGS) \
$(DEBUG_FLAGS) \
-x assembler-with-cpp \
$(addprefix -I,$(INCLUDE_DIRS)) \
$(addprefix -isystem,$(SYS_INCLUDE_DIRS)) \
-MMD -MP
ifeq ($(LD_FLAGS),)
@ -359,6 +361,7 @@ endif
CPPCHECK = cppcheck $(CSOURCES) --enable=all --platform=unix64 \
--std=c99 --inline-suppr --quiet --force \
$(addprefix -I,$(INCLUDE_DIRS)) \
$(addprefix -isystem,$(SYS_INCLUDE_DIRS)) \
-I/usr/include -I/usr/include/linux
TARGET_NAME := $(TARGET)