summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@sifive.com>2019-03-25 14:33:03 -0700
committerNathaniel Graff <nathaniel.graff@sifive.com>2019-03-25 14:34:16 -0700
commit856ee446246f4967bcbaf8654e302d865c467e6b (patch)
tree277b016689058f9869b51539b0a705eacce150e5 /scripts
parent24f4ba0d5d5fa4378f14f3d56b18e041a01f2955 (diff)
Set ASFLAGS to work
This allows users to specify raw assembly files in their build scripts. Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/standalone.mk3
1 files changed, 3 insertions, 0 deletions
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)" \