1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

makefiles/toolchain/llvm.inc.mk: fix include headers

With GCC, the C++ compiler knows all builtin C include paths *and*
all builtin C++ include paths, but the C compiler only knows the
C include paths. Hence, let's use the C++ compiler to collect
the include paths.
This commit is contained in:
Marian Buschsieweke 2023-05-19 22:09:56 +02:00 committed by Marian Buschsieweke
parent e8bb46ece6
commit 33442fdb71
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -36,14 +36,14 @@ SIZE = $(LLVMPREFIX)size
include $(RIOTMAKE)/tools/gdb.inc.mk
# Include directories from gcc
# $1: language <c|cpp>
# $1: language <c|c++>
#
# `realpath` is used instead of `abspath` to support Mingw32 which has issues
# with windows formatted gcc directories
#
# CFLAGS_CPU is used to get the correct multilib include header.
gcc_include_dirs = $(realpath \
$(shell $(PREFIX)gcc $(CFLAGS_CPU) -v -x $1 -E /dev/null 2>&1 | \
$(shell $(PREFIX)g++ $(CFLAGS_CPU) -v -x $1 -E /dev/null 2>&1 | \
sed \
-e '1,/\#include <...> search starts here:/d' \
-e '/End of search list./,$$d' \