From a65deddd7375ead7fe495f66470f1978a5d21f3d Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Fri, 15 Mar 2019 15:53:51 -0700 Subject: Use newlib-nano Signed-off-by: Nathaniel Graff --- scripts/standalone.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/standalone.mk b/scripts/standalone.mk index 78328c5..cc35559 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -96,6 +96,10 @@ RISCV_CXXFLAGS += -ffunction-sections -fdata-sections RISCV_ASFLAGS += -I$(abspath $(BSP_DIR)/install/include/) RISCV_CFLAGS += -I$(abspath $(BSP_DIR)/install/include/) RISCV_CXXFLAGS += -I$(abspath $(BSP_DIR)/install/include/) +# Use newlib-nano +RISCV_ASFLAGS += --specs=nano.specs +RISCV_CFLAGS += --specs=nano.specs +RISCV_CXXFLAGS += --specs=nano.specs # Turn on garbage collection for unused sections RISCV_LDFLAGS += -Wl,--gc-sections -- cgit v1.2.3 From 878c52d332da287711aaf9055ac148a6f18e19bf Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Wed, 10 Apr 2019 10:49:58 -0700 Subject: Use CCASFLAGS instead of ASFLAGS Signed-off-by: Nathaniel Graff --- scripts/standalone.mk | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/standalone.mk b/scripts/standalone.mk index cc35559..913b24b 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -86,20 +86,20 @@ SEGGER_JLINK_GDB_SERVER := JLinkGDBServer ############################################################# # Set the arch, ABI, and code model -RISCV_ASFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL) -RISCV_CFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL) -RISCV_CXXFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL) +RISCV_CCASFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL) +RISCV_CFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL) +RISCV_CXXFLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL) # Prune unused functions and data RISCV_CFLAGS += -ffunction-sections -fdata-sections RISCV_CXXFLAGS += -ffunction-sections -fdata-sections # Include the Metal headers -RISCV_ASFLAGS += -I$(abspath $(BSP_DIR)/install/include/) -RISCV_CFLAGS += -I$(abspath $(BSP_DIR)/install/include/) -RISCV_CXXFLAGS += -I$(abspath $(BSP_DIR)/install/include/) +RISCV_CCASFLAGS += -I$(abspath $(BSP_DIR)/install/include/) +RISCV_CFLAGS += -I$(abspath $(BSP_DIR)/install/include/) +RISCV_CXXFLAGS += -I$(abspath $(BSP_DIR)/install/include/) # Use newlib-nano -RISCV_ASFLAGS += --specs=nano.specs -RISCV_CFLAGS += --specs=nano.specs -RISCV_CXXFLAGS += --specs=nano.specs +RISCV_CCASFLAGS += --specs=nano.specs +RISCV_CFLAGS += --specs=nano.specs +RISCV_CXXFLAGS += --specs=nano.specs # Turn on garbage collection for unused sections RISCV_LDFLAGS += -Wl,--gc-sections @@ -149,6 +149,7 @@ $(PROGRAM_ELF): \ CC=$(RISCV_GCC) \ CXX=$(RISCV_GXX) \ ASFLAGS="$(RISCV_ASFLAGS)" \ + CCASFLAGS="$(RISCV_CCASFLAGS)" \ CFLAGS="$(RISCV_CFLAGS)" \ CXXFLAGS="$(RISCV_CXXFLAGS)" \ LDFLAGS="$(RISCV_LDFLAGS)" \ -- cgit v1.2.3