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. (#14388)

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.

Co-authored-by: Matthew Selby <matthewjselby@aol.com>
This commit is contained in:
mjs1441 2025-05-15 21:11:29 +01:00 committed by GitHub
parent 144314b820
commit b845d6dfd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)