diff --git a/apps/config.mk b/apps/config.mk index 6f08d01963d505a81e49fe6c0a4495b4b264345b..3fda230a89241540bcb290ce682ff4340535ea29 100644 --- a/apps/config.mk +++ b/apps/config.mk @@ -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) diff --git a/build.sh b/build.sh index 4475a50ae37deb0665283f3078adce69b20be7ae..41f4ddae8d2d773518dde0990e556b24c31d6b6a 100755 --- a/build.sh +++ b/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 diff --git a/kernel/extended/vdso/usr/Makefile b/kernel/extended/vdso/usr/Makefile index aac0727e92022e48bfb2ad512095c01ce6a2a127..f4bef985e5613e669b30dcb478d30da3ee293b9b 100644 --- a/kernel/extended/vdso/usr/Makefile +++ b/kernel/extended/vdso/usr/Makefile @@ -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