diff --git a/bootrom/Makefile b/bootrom/Makefile index 7aa360c3f..f9ac61db7 100644 --- a/bootrom/Makefile +++ b/bootrom/Makefile @@ -137,6 +137,7 @@ $(OBJDIR)/bootrom.elf: $(VERSIONOBJ) $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ) $(ARMLIB_OB clean: $(Q)$(RM) $(OBJDIR)$(PATHSEP)*.o + $(Q)$(RM) $(OBJDIR)$(PATHSEP)*.a $(Q)$(RM) $(OBJDIR)$(PATHSEP)*.elf $(Q)$(RM) $(OBJDIR)$(PATHSEP)*.s19 $(Q)$(RM) $(OBJDIR)$(PATHSEP)*.map diff --git a/common_arm/Common.cmake b/common_arm/Common.cmake index e6052f776..5b7a4921f 100644 --- a/common_arm/Common.cmake +++ b/common_arm/Common.cmake @@ -106,6 +106,7 @@ set(CROSS_CFLAGS ${CROSS_CFLAGS} ${INCLUDE} # -std=c99 TODO 暂时切换为c11标准,因为新的平台需要c11标准,AT32的官方库一堆c11写法,不这么做的话改起来很麻烦 -std=c11 + -fno-common -DON_DEVICE ${APP_CFLAGS}) set(CROSS_LDFLAGS ${CROSS_LDFLAGS} diff --git a/common_arm/Makefile.common b/common_arm/Makefile.common index 174313200..a9799d5a2 100644 --- a/common_arm/Makefile.common +++ b/common_arm/Makefile.common @@ -97,7 +97,7 @@ ifeq ($(NOERROR),1) endif CROSS_CFLAGS ?= $(DEFCFLAGS) -CROSS_CFLAGS += -c -std=c99 -mthumb-interwork -fno-builtin -ffunction-sections -fdata-sections +CROSS_CFLAGS += -c -std=c99 -mthumb-interwork -fno-builtin -fno-common -ffunction-sections -fdata-sections # stack-protect, no-pie reduces size on Gentoo Hardened 8.2 gcc CROSS_CFLAGS += -fno-stack-protector -fno-pie CROSS_CFLAGS += -DON_DEVICE $(INCLUDE) $(APP_CFLAGS)