diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/src/common/Toolchain.defs index 8c71515b9aa..e8dee552351 100644 --- a/arch/arm/src/common/Toolchain.defs +++ b/arch/arm/src/common/Toolchain.defs @@ -78,11 +78,17 @@ endif ifeq ($(CONFIG_LTO_THIN),y) ARCHOPTIMIZATION += -flto=thin + ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y) + LDFLAGS += --lto + endif else ifeq ($(CONFIG_LTO_FULL),y) ARCHOPTIMIZATION += -flto ifeq ($(CONFIG_ARM_TOOLCHAIN_GNU_EABI),y) ARCHOPTIMIZATION += -fuse-linker-plugin endif + ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y) + LDFLAGS += --lto + endif endif # NuttX buildroot under Linux or Cygwin @@ -220,9 +226,10 @@ ifneq ($(CONFIG_CXX_RTTI),y) endif ARCHOPTIMIZATION += -fno-common -Wall -Wshadow -Wundef -ARCHOPTIMIZATION += -nostdlib -ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),) +ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y) + ARCHOPTIMIZATION += -nostdlib +else LDFLAGS += -nostdlib endif diff --git a/boards/arm/imx6/sabre-6quad/scripts/dramboot.sct b/boards/arm/imx6/sabre-6quad/scripts/dramboot.sct index c93ab492bc7..2c4509fa8e8 100644 --- a/boards/arm/imx6/sabre-6quad/scripts/dramboot.sct +++ b/boards/arm/imx6/sabre-6quad/scripts/dramboot.sct @@ -101,7 +101,7 @@ OSCRAM_SECTIONS DDR3_START DDR3_SIZE CONSTRUCTORS } - bss AlignExpr(ImageLimit(data), 0x8) + bss AlignExpr(ImageLimit(data), 0x10) { *(.bss) *(.bss.*)