!318 fix: avoid compile warning ignored

Merge pull request !318 from MGY917/citu_clean
This commit is contained in:
openharmony_ci 2021-06-17 08:57:00 +08:00 committed by Gitee
commit bfb74b2027
3 changed files with 9 additions and 8 deletions

View File

@ -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)

View File

@ -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

View File

@ -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