Skip to content

Commit 068d4e1

Browse files
committed
Adaptions for clang
1 parent 65908e7 commit 068d4e1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/trice_lib_reusable.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,20 @@ jobs:
150150
151151
# Provide Newlib + GCC internal headers to clang (cross).
152152
# This is required for stdlib.h, stdint.h, etc. in bare-metal builds.
153-
NEWLIB_INC="/usr/arm-none-eabi/include"
153+
154+
NEWLIB_STDLIB="$(arm-none-eabi-gcc -print-file-name=stdlib.h)"
155+
NEWLIB_INC="$(dirname "${NEWLIB_STDLIB}")"
154156
GCC_INC="$(arm-none-eabi-gcc -print-file-name=include)"
155157
156158
# Fail early with a clear error if paths are missing.
159+
test -f "${NEWLIB_STDLIB}"
157160
test -d "${NEWLIB_INC}"
158161
test -d "${GCC_INC}"
159162
160163
# Makefile will append this to clang flags (see clang0.mak change).
161164
export CLANG_SYS_INCLUDES="-isystem ${NEWLIB_INC} -isystem ${GCC_INC}"
165+
echo "NEWLIB_INC=${NEWLIB_INC}"
166+
echo "GCC_INC=${GCC_INC}"
162167
echo "CLANG_SYS_INCLUDES=${CLANG_SYS_INCLUDES}"
163168
164169
./ci_build.sh \

0 commit comments

Comments
 (0)