diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-03-26 17:15:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-26 17:15:48 +0000 |
commit | 3c17229e0e982868006946884a7214e06ab8543c (patch) | |
tree | 277b016689058f9869b51539b0a705eacce150e5 | |
parent | 24f4ba0d5d5fa4378f14f3d56b18e041a01f2955 (diff) | |
parent | 856ee446246f4967bcbaf8654e302d865c467e6b (diff) |
Merge pull request #215 from sifive/asflags
Support raw assembly
-rw-r--r-- | debug.mk | 2 | ||||
-rw-r--r-- | release.mk | 1 | ||||
-rw-r--r-- | scripts/standalone.mk | 3 |
3 files changed, 6 insertions, 0 deletions
@@ -3,10 +3,12 @@ ################################################### # Set the optimization level +RISCV_ASFLAGS += -O0 RISCV_CFLAGS += -O0 RISCV_CXXFLAGS += -O0 # Enable debug +RISCV_ASFLAGS += -g RISCV_CFLAGS += -g RISCV_CXXFLAGS += -g @@ -3,5 +3,6 @@ ################################################### # Set the optimization level +RISCV_ASFLAGS += -Os RISCV_CFLAGS += -Os RISCV_CXXFLAGS += -Os diff --git a/scripts/standalone.mk b/scripts/standalone.mk index 8098122..78328c5 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -86,12 +86,14 @@ 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) # 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/) @@ -142,6 +144,7 @@ $(PROGRAM_ELF): \ AR=$(RISCV_AR) \ CC=$(RISCV_GCC) \ CXX=$(RISCV_GXX) \ + ASFLAGS="$(RISCV_ASFLAGS)" \ CFLAGS="$(RISCV_CFLAGS)" \ CXXFLAGS="$(RISCV_CXXFLAGS)" \ LDFLAGS="$(RISCV_LDFLAGS)" \ |