CXX := x86_64-elf-g++
CXXFLAGS ?= -O2
-CXXFLAGS := $(CXXFLAGS) -std=c++20 -fno-strict-aliasing -Wall -Wextra -Werror \
+CXXFLAGS := $(CXXFLAGS) -std=c++20 -fno-strict-aliasing -Wall -Wextra -Werror -Wfatal-errors \
-mgeneral-regs-only -fno-exceptions -fno-rtti -ffreestanding
LDFLAGS ?= -O2
LDFLAGS := $(LDFLAGS) -std=c++20 -Wall -Wextra -Werror -ffreestanding
LOCAL_CXXFLAGS := $(CXXFLAGS) -mcmodel=kernel -mno-red-zone \
-isystem /usr/include -isystem /usr/include/c++/13.1.1 \
-isystem /usr/include/c++/13.1.1/x86_64-pc-linux-gnu
- # The previous two lines are a dirty hack.
+ # The previous two lines are a dirty hack. But not that much, because it doesn't allow me to include non-freestanding headers anyways
LOCAL_LDFLAGS := $(LDFLAGS) -T kernel/linker.ld -z max-page-size=0x1000 \
-mno-red-zone -mcmodel=kernel