rewrite the device subsystem interfaces (#48)
[lunaix-os.git] / lunaix-os / makeinc / toolchain.mkinc
index 486e9ce74ccf5c178a800dcd587f6a82c58e539b..246b9d15196ff53d78a318494311f206a1b07d2c 100644 (file)
@@ -4,7 +4,7 @@ AS := $(CX_PREFIX)as
 AR := $(CX_PREFIX)ar
 LBUILD ?= $(shell realpath ./scripts/build-tools/luna_build.py)
 
-O := -O2
+
 W := -Wall -Wextra -Werror \
                -Wno-unknown-pragmas \
                -Wno-unused-function \
@@ -14,12 +14,15 @@ W := -Wall -Wextra -Werror \
                -Wno-discarded-qualifiers\
                -Werror=incompatible-pointer-types
 
-OFLAGS := -fno-omit-frame-pointer
+OFLAGS := -fno-omit-frame-pointer      \
+             -finline-small-functions
 
 CFLAGS := -std=gnu99 $(OFLAGS) $(W) -g
 
 ifeq ($(MODE),debug)
-       O = -Og
+       O := -Og
+else
+       O := -O2
 endif
 
 CFLAGS += $(O)