fix: temporary disable the cse optimizations that cause kernel misbehave.
[lunaix-os.git] / lunaix-os / config / make-cc
index 416ae68828fa23ea3f86e5b9735846b462134acf..ed1f6786021a640316dc2fba02a091fb78d12a61 100644 (file)
@@ -1,7 +1,22 @@
 CC := i686-elf-gcc
 AS := i686-elf-as
 
+
+ARCH_OPT := -D__ARCH_IA32
 O := -O2
-W := -Wall -Wextra
-CFLAGS := -std=gnu99 -ffreestanding $(O) $(W)
+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