meta: Apply ARCH_USER_CFLAGS when building libc

This commit is contained in:
K. Lange 2023-10-09 08:32:05 +09:00
parent bda8c8d67b
commit 4eec1e07c7

View File

@ -64,6 +64,7 @@ KRK_MODS_X = $(patsubst lib/kuroko/%.c,$(BASE)/lib/kuroko/%.so,$(wildcard lib/ku
KRK_MODS_Y = $(patsubst lib/kuroko/%.c,.make/%.kmak,$(wildcard lib/kuroko/*.c))
CFLAGS= -O2 -std=gnu11 -I. -Iapps -fplan9-extensions -Wall -Wextra -Wno-unused-parameter ${ARCH_USER_CFLAGS}
LIBC_CFLAGS = -O2 -std=gnu11 -ffreestanding -Wall -Wextra -Wno-unused-parameter ${ARCH_USER_CFLAGS}
LIBC_OBJS = $(patsubst %.c,%.o,$(wildcard libc/*.c))
LIBC_OBJS += $(patsubst %.c,%.o,$(wildcard libc/*/*.c))
@ -134,7 +135,7 @@ clean:
-rm -f boot/efi/*.o boot/bios/*.o
libc/%.o: libc/%.c base/usr/include/syscall.h
$(CC) -O2 -std=gnu11 -ffreestanding -Wall -Wextra -Wno-unused-parameter -fPIC -c -o $@ $<
$(CC) ${LIBC_CFLAGS} -fPIC -c -o $@ $<
.PHONY: libc
libc: $(BASE)/lib/libc.a $(BASE)/lib/libc.so