generic: groundwork for RISC-V
[openwrt/openwrt.git] / include / target.mk
index 992f95534442c58d1a6de5dfe22a7271a2c5283f..b5e3e7ff6fdeca22c917c7024d53914d32d82a7e 100644 (file)
@@ -260,6 +260,10 @@ ifeq ($(DUMP),1)
     CPU_CFLAGS_arc700 = -mcpu=arc700
     CPU_CFLAGS_archs = -mcpu=archs
   endif
+  ifeq ($(ARCH),riscv64)
+    CPU_TYPE ?= riscv64
+    CPU_CFLAGS_riscv64:=-mabi=lp64d -march=rv64imafdc
+  endif
   ifneq ($(CPU_TYPE),)
     ifndef CPU_CFLAGS_$(CPU_TYPE)
       $(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)