HOSTCC = gcc
HOSTCXX = g++
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
+HOSTCFLAGS = -Wall -Wstrict-prototypes -fomit-frame-pointer \
-Wno-unused -Wno-format-security -U_FORTIFY_SOURCE
-HOSTCXXFLAGS = -O2
+HOSTCXXFLAGS = -O
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
CPPFLAGS := $(V3_INCLUDE) -D__V3VEE__
-CFLAGS := -fno-stack-protector -Wall -O -Werror -fPIC -mno-red-zone
+CFLAGS := -fno-stack-protector -Wall -Werror -fPIC -mno-red-zone -fno-common
+#-fPIC
+#-ffreestanding
-LDFLAGS := --whole-archive
+
+LDFLAGS := --whole-archive
ifeq ($(call cc-option-yn, -fgnu89-inline),y)
CFLAGS += -fgnu89-inline
ifdef CONFIG_DEBUG_INFO
CFLAGS += -g
+else
+CFLAGS += -O
endif