This commit is contained in:
mintsuki 2023-03-27 01:59:59 +02:00
parent b3c07c03ad
commit 8e3d0d9991

View file

@ -36,36 +36,36 @@ $(eval $(call DEFAULT_VAR,NASMFLAGS,-F dwarf -g))
$(eval $(call DEFAULT_VAR,LDFLAGS,)) $(eval $(call DEFAULT_VAR,LDFLAGS,))
# Internal C flags that should not be changed by the user. # Internal C flags that should not be changed by the user.
override CFLAGS += \ override CFLAGS += \
-std=gnu11 \ -std=gnu11 \
-ffreestanding \ -ffreestanding \
-fno-stack-protector \ -fno-stack-protector \
-fno-stack-check \ -fno-stack-check \
-fno-lto \ -fno-lto \
-fno-pie \ -fno-pie \
-fno-pic \ -fno-pic \
-m64 \ -m64 \
-march=x86-64 \ -march=x86-64 \
-mabi=sysv \ -mabi=sysv \
-mno-80387 \ -mno-80387 \
-mno-mmx \ -mno-mmx \
-mno-sse \ -mno-sse \
-mno-sse2 \ -mno-sse2 \
-mno-red-zone \ -mno-red-zone \
-mcmodel=kernel -mcmodel=kernel
# Internal C preprocessor flags that should not be changed by the user. # Internal C preprocessor flags that should not be changed by the user.
override CPPFLAGS := \ override CPPFLAGS := \
-I. \ -I. \
$(CPPFLAGS) \ $(CPPFLAGS) \
-MMD \ -MMD \
-MP -MP
# Internal linker flags that should not be changed by the user. # Internal linker flags that should not be changed by the user.
override LDFLAGS += \ override LDFLAGS += \
-nostdlib \ -nostdlib \
-static \ -static \
-m elf_x86_64 \ -m elf_x86_64 \
-z max-page-size=0x1000 \ -z max-page-size=0x1000 \
-T linker.ld -T linker.ld
@ -91,7 +91,7 @@ override HEADER_DEPS := $(CFILES:.c=.d) $(ASFILES:.S=.d)
all: $(KERNEL) all: $(KERNEL)
limine.h: limine.h:
curl https://raw.githubusercontent.com/limine-bootloader/limine/trunk/limine.h -o $@ curl -Lo $@ https://github.com/limine-bootloader/limine/raw/trunk/limine.h
# Link rules for the final kernel executable. # Link rules for the final kernel executable.
$(KERNEL): $(OBJ) $(KERNEL): $(OBJ)