fix: temporary disable the cse optimizations that cause kernel misbehave.
[lunaix-os.git] / lunaix-os / config / make-cc
index 643b4eee1dbefc44c9c9e0f86d9f0c4534b62f8a..ed1f6786021a640316dc2fba02a091fb78d12a61 100644 (file)
@@ -4,6 +4,19 @@ AS := i686-elf-as
 
 ARCH_OPT := -D__ARCH_IA32
 O := -O2
 
 ARCH_OPT := -D__ARCH_IA32
 O := -O2
-W := -Wall -Wextra -Wno-unknown-pragmas
-CFLAGS := -std=gnu99 -ffreestanding $(O) $(W) $(ARCH_OPT)
+W := -Wall -Wextra -Wno-unknown-pragmas \
+               -Wno-unused-function \
+               -Wno-unused-but-set-variable \
+               -Wno-unused-parameter \
+               -Wno-unused-variable\
+               -Werror=incompatible-pointer-types
+
+OFLAGS := -fno-gcse\
+                 -fno-gcse-lm\
+                 -fno-cse-follow-jumps\
+                 -fno-cse-skip-blocks\
+                 -fno-optimize-strlen\
+                 -fno-tree-builtin-call-dce 
+
+CFLAGS := -std=gnu99 -ffreestanding $(O) $(OFLAGS) $(W) $(ARCH_OPT)
 LDFLAGS := -ffreestanding $(O) -nostdlib -lgcc
\ No newline at end of file
 LDFLAGS := -ffreestanding $(O) -nostdlib -lgcc
\ No newline at end of file