fix: avoid compile warning ignored
Close #I3VOAO Change-Id: I42103e0e7061e50f8d63df98ea9f5cecd49fe6f4 Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
This commit is contained in:
parent
a760c268f4
commit
eca711bb64
|
@ -37,7 +37,7 @@ LIBSOUT := $(OBJOUT)/libs
|
|||
IMGOUT := $(OUT)
|
||||
|
||||
# common flags config
|
||||
BASE_OPTS := -ffunction-sections -fdata-sections -fno-omit-frame-pointer -D_GNU_SOURCE \
|
||||
BASE_OPTS := -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-common -fno-strict-aliasing -D_GNU_SOURCE \
|
||||
$(LITEOS_SSP) $(LITEOS_CORE_COPTS) $(WARNING_AS_ERROR) $(LLVM_EXTRA_OPTS) $(LITEOS_GCOV_OPTS)
|
||||
|
||||
CFLAGS := -std=c99 -fno-exceptions $(BASE_OPTS) $(LITEOS_COPTS_OPTMIZE)
|
||||
|
|
12
build.sh
12
build.sh
|
@ -38,22 +38,22 @@ outdir="../..$3/test_info/gen/kernel/test"
|
|||
if [ "$5" = "tee" ]; then
|
||||
tee="_tee"
|
||||
fi
|
||||
productName="$(basename $7)"
|
||||
source="tools/build/config/${productName}_release.config"
|
||||
product_name="$(basename $7)"
|
||||
source="tools/build/config/${product_name}_release.config"
|
||||
if [ "$2" = "clang" ]; then
|
||||
if [ "$4" = "debug" ]; then
|
||||
config_file="${productName}_$2$tee.config"
|
||||
config_file="${product_name}_$2$tee.config"
|
||||
source="tools/build/config/debug/$config_file"
|
||||
else
|
||||
config_file="${productName}_$2_release$tee.config"
|
||||
config_file="${product_name}_$2_release$tee.config"
|
||||
source="tools/build/config/$config_file"
|
||||
fi
|
||||
elif [ "$2" = "gcc" ]; then
|
||||
if [ "$4" = "debug" ]; then
|
||||
config_file="${productName}_debug_shell$tee.config"
|
||||
config_file="${product_name}_debug_shell$tee.config"
|
||||
source="tools/build/config/$config_file"
|
||||
else
|
||||
config_file="${productName}_release$tee.config"
|
||||
config_file="${product_name}_release$tee.config"
|
||||
source="tools/build/config/$config_file"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -37,7 +37,8 @@ VDSO_INCLUDE := -I $(LITEOSTOPDIR)/kernel/extended/vdso/include \
|
|||
-I $(LITEOSTOPDIR)/kernel/common \
|
||||
-I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include
|
||||
|
||||
VDSO_CCFLAGS := -nostdlib -fPIC $(LITEOS_SSP) $(LITEOS_CORE_COPTS) $(WARNING_AS_ERROR) $(LITEOS_COPTS_OPTMIZE)
|
||||
VDSO_CCFLAGS := -nostdlib -fPIC -fno-common -fno-strict-aliasing \
|
||||
$(LITEOS_SSP) $(LITEOS_CORE_COPTS) $(WARNING_AS_ERROR) $(LITEOS_COPTS_OPTMIZE)
|
||||
ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y)
|
||||
VDSO_CCFLAGS += $(LLVM_EXTRA_OPTS) --sysroot=$(LITEOSTOPDIR)/../../prebuilts/lite/sysroot/
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue