diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-04-11 21:40:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 21:40:18 +0000 |
commit | a4d97b7aec6eb939eb1f61883591ba5cc58be258 (patch) | |
tree | 2c2ec40b70c96ec4d166957e8b3a1878d027988c /scripts | |
parent | 931b6c5cba1bb2c18235e2e7cb7db586b086dda9 (diff) | |
parent | 878c52d332da287711aaf9055ac148a6f18e19bf (diff) |
Merge pull request #231 from sifive/newlib-nano
Switch to newlib-nano and use CCASFLAGS
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/standalone.mk | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/scripts/standalone.mk b/scripts/standalone.mk index 78328c5..913b24b 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -86,16 +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_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 @@ -145,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)" \ |