summaryrefslogtreecommitdiff
path: root/platform/template
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-01-18 04:33:47 +0300
committerAnup Patel <anup@brainfault.org>2019-02-08 06:48:46 +0300
commit5a91fec1a80939e78e37a0b2bc1d3043dcac23f4 (patch)
treeaaddc0894f782c361a11ea5d72f2aa9efdff0d56 /platform/template
parentb4c72deba98b6398a4c44198553093670d226e2d (diff)
downloadopensbi-5a91fec1a80939e78e37a0b2bc1d3043dcac23f4.tar.xz
platform/qemu/virt: Dynamically calculate xlen
The QEMU virt machine can be either 32 or 66 bit. Don't hard code the CPU bit length and instead let the compiler determine it. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'platform/template')
-rw-r--r--platform/template/config.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/template/config.mk b/platform/template/config.mk
index b1457da..21aa6d6 100644
--- a/platform/template/config.mk
+++ b/platform/template/config.mk
@@ -12,6 +12,8 @@ platform-cppflags-y =
# -mabi=lp64 -march=rv64imafdc -mcmodel=medany
# For a 32 bits platform, this will likely be:
# -mabi=lp32 -march=rv32imafdc -mcmodel=medlow
+# You can also use the Makefile variable OPENSBI_CC_XLEN for the xlen
+# See the QEMU virt machine for an example of this
platform-cflags-y = -mabi=lp64 -march=rv64imafdc -mcmodel=medany
platform-asflags-y = -mabi=lp64 -march=rv64imafdc -mcmodel=medany