scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 5d10a2436b4df6c82723bb7174451ab267512155
parent 4db66b3e48d2821ea034c2cc9e233594695872ca
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Mon,  1 Jun 2026 23:08:14 +0200

build/libc: Recover the definition of CPPINCLUDES

While this definition is not needed anymore because we use
scc to build the libc, not having it creates problems in
the config-musl configuration, which would try to use the
musl headers with the scc libc. Adding these additional -I
is odd, but not building the libc in the case of musl creates
other problems, because the proto files used in the install
target require the different libcs to be built and present in
the lib directory.

Diffstat:
Msrc/libc/Makefile | 2+-
Msrc/libc/rules.mk | 10++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/libc/Makefile b/src/libc/Makefile @@ -18,7 +18,7 @@ include rules.mk include objs/$(ARCH)-$(SYS).mk NODEP = 1 -TARGET = $(LIBC) $(BINDIR)/gcc-scc +TARGET = $(LIBC) all: $(DIRS) +@$(MAKE) $(TARGET) diff --git a/src/libc/rules.mk b/src/libc/rules.mk @@ -7,6 +7,12 @@ SYSERRNO = $(INCDIR)/bits/$(SYS)/sys/errno.h LIBC = $(LIBCDIR)/libc.a CRT = $(LIBCDIR)/crt.o +CPPINCLUDES =\ + -I$(INCDIR)\ + -I$(INCDIR)/bits/$(SYS)\ + -I$(INCDIR)/bits/$(ARCH)\ + -I$(INCDIR)/bits/$(SYS)/$(ARCH)\ + # Rules .SUFFIXES: .$O @@ -15,7 +21,7 @@ _sys_errlist.c: $(SYSERRNO) ../../mkerrstr $(SYSERRNO) _sys_errlist.$O: _sys_errlist.c - $(CC) $(CFLAGS) -c -o $@ _sys_errlist.c + $(CC) $(CFLAGS) $(CPPINCLUDES) -c -o $@ _sys_errlist.c $(CRT): crt.$O cp crt.$O $@ @@ -26,7 +32,7 @@ clean-libc: FORCE rm -f *.5? *.6? *.7? *.8? *.z *.q .c.$O: - $(CC) $(CFLAGS) -o $@ -c $< + $(CC) $(CFLAGS) $(CPPINCLUDES) -o $@ -c $< .s.$O: $(AS) $(PROJ_ASFLAGS) $< -o $@