Move libc to sysroot

This commit is contained in:
pjht 2019-08-26 17:00:00 -05:00
parent 4fadffc59a
commit a4bb07e358
4 changed files with 5 additions and 5 deletions

View File

@ -48,10 +48,10 @@ fsdrv: fsdrv/* kernel/start.o
@cp $@/$@ initrd/$@
kernel/kernel.elf: $(OBJ) $(ASM_OBJ) $(S_ASM_OBJ) libc/libc.a
kernel/kernel.elf: $(OBJ) $(ASM_OBJ) $(S_ASM_OBJ) sysroot/usr/lib/libc.a
@$(CC) -z max-page-size=4096 -Xlinker -n -T kernel/cpu/$(PLAT)/linker.ld -o $@ $(CFLAGS) -nostdlib $^ -lgcc
libc/libc.a: $(LIBC_OBJ)
sysroot/usr/lib/libc.a: $(LIBC_OBJ)
@$(AR) rcs $@ $^
%.o: %.c

View File

@ -4,7 +4,7 @@ CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
CC = i386-elf-gcc
fsdrv: $(OBJ) ../libc/*
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../libc/libc.a -lgcc
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../sysroot/usr/lib/libc.a -lgcc
%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@

View File

@ -4,7 +4,7 @@ CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
CC = i386-elf-gcc
init: $(OBJ) ../libc/*
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../libc/libc.a -lgcc
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../sysroot/usr/lib/libc.a -lgcc
%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@

View File

@ -4,7 +4,7 @@ CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
CC = i386-elf-gcc
vfs: $(OBJ) ../libc/*
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../libc/libc.a -lgcc
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../sysroot/usr/lib/libc.a -lgcc
%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@