Missing '-I' when added the khronos include dir

I was trying to build sdl2 with tcc and hit the following error

tcc: error: cannot specify output file with -c many files
The full command being executed is

echo "  CC    " build/SDL.lo;/bin/sh ./libtool --quiet --tag=CC --mode=compile tcc -g -DUSING_GENERATED_CONFIG_H -Iinclude -I/tmp/sdl2/include /tmp/sdl2/src/video/khronos  -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=30 -DSDL_BUILD_MICRO_VERSION=10 -Wall -Wno-unused-local-typedefs -fno-strict-aliasing -Wdeclaration-after-statement -Werror=declaration-after-statement   -I/usr/include/libdrm  -D_REENTRANT -DHAVE_LINUX_VERSION_H  -c /tmp/sdl2/src/SDL.c -o build/SDL.lo

The suspicious part is coming EXTRA_CFLAGS. Looking at the Make file

EXTRA_CFLAGS = -Iinclude -I/tmp/sdl2/include /tmp/sdl2/src/video/khronos  ...

I think it should be

EXTRA_CFLAGS = -Iinclude -I/tmp/sdl2/include -I /tmp/sdl2/src/video/khronos  ...

I would just edit the Makefile if it wasn’t auto created. I’m not familiar with CMake so thought it would be faster to just post here so someone could make the trivial fix.

Note that gcc doesn’t complain about this
Note that tcc still won’t compile with this fix. It’ll complain about NULL be redfined due to ./include/begin_code.h and also about lack of spin locks. These seem like separate issues but don’t want to give the impression that tcc could be used if just this was fixed.

I don’t know CMake either.

regarding NULL, just don’t redefine it? stdlib.h and stddef.h should be properly guarded. regarding spin locks, are you using atomics?

can’t help much without exact errors and code, without context.

you could try to devise a MRE or share your code on e.g. GitHub if it is too much

regarding NULL, just don’t redefine it?

Yup. It is a tangent to the question; I just brought it up to indicate that solving the target issue isn’t a complete solution. Same thing with the spinlocks; just more of an fyi in case anyone was trying to reproduce the issue since would hit that next.
My goal here was just to report/fix the CFLAGs bug here.

But for context is that I’m on musl (1.2.5) with the latest tcc (mob@68000c01). configure was run with

./configure \
    --disable-video-opengl \
    --enable-video-opengles \
    --disable-rpath \
    --prefix=/usr