fix: bugs related to O2 optimization
[lunaix-os.git] / lunaix-os / config / make-cc
index 00ed9f34898ebbf84ae083fee944822d85dec0f3..71f3b7675e59f4f97d678d35f8df2f7269f9da70 100644 (file)
@@ -1,10 +1,15 @@
-TOOLCHAIN := ${HOME}/opt/cross-compiler/bin/
-CC := ${TOOLCHAIN}i686-elf-gcc
-AS := ${TOOLCHAIN}i686-elf-as
+CC := i686-elf-gcc
+AS := i686-elf-as
 
 
 ARCH_OPT := -D__ARCH_IA32
-O := -O2
-W := -Wall -Wextra -Wno-unknown-pragmas
+O := -O1
+W := -Wall -Wextra -Wno-unknown-pragmas \
+               -Wno-unused-function \
+               -Wno-unused-but-set-variable \
+               -Wno-unused-parameter \
+               -Wno-unused-variable\
+               -Werror=incompatible-pointer-types
+               
 CFLAGS := -std=gnu99 -ffreestanding $(O) $(W) $(ARCH_OPT)
 LDFLAGS := -ffreestanding $(O) -nostdlib -lgcc
\ No newline at end of file