LDFLAGS ?= -O2
LDFLAGS := $(LDFLAGS) -Wall -Wextra -Werror -std=c++20 \
-ffreestanding -T linker.ld -z max-page-size=0x1000 \
- -mno-red-zone -mcmodel=large # Normally has no effect, but is used to change the multilib libgcc, to use mcmodel=large and be able to use global constructors and destructors.
+ -mno-red-zone -mcmodel=kernel # Normally has no effect, but is used to change the multilib libgcc, to use mcmodel=kernel and be able to use global constructors and destructors.
LDLIBS := $(LDLIBS) -nostdlib -lgcc
CPPOBJS := $(patsubst $(SRC_DIR)%,$(OUT_DIR)%.o,$(shell find $(SRC_DIR) -name '*.cpp'))