diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2019-02-15 14:56:53 -0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-02-17 16:21:18 +0530 |
commit | 16426420b5d6bbf16c035503dd7d9eabd91e3f04 (patch) | |
tree | fd732be2d71af0e46697df54dbdcdba231d22d0e /Makefile | |
parent | 3c53950b003af585de66c6eeddcf8cc17eb6c890 (diff) |
Makefile: Fix the assignment of OPENSBI_CC_XLEN
Previously OPENSBI_CC_XLEN was not being correctly assigned either 32 or
64. It also was not assigned before config.mk was parsed. Ensure that it
will always be assigned.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -54,6 +54,9 @@ export firmware_dir=$(CURDIR)/firmware OPENSBI_VERSION_MAJOR=`grep MAJOR $(include_dir)/sbi/sbi_version.h | awk '{ print $$3 }'` OPENSBI_VERSION_MINOR=`grep MINOR $(include_dir)/sbi/sbi_version.h | awk '{ print $$3 }'` +# Guess the compillers xlen +OPENSBI_CC_XLEN := $(shell TMP=`$(CC) -dumpmachine`; echo $${TMP:5:2}) + # Setup list of objects.mk files ifdef PLATFORM platform-object-mks=$(shell if [ -d $(platform_dir) ]; then find $(platform_dir) -iname "objects.mk" | sort -r; fi) @@ -116,9 +119,6 @@ endif AS = $(CC) DTC = dtc -# Guess the compillers xlen -OPENSBI_CC_XLEN = `expr substr \`$(CC) -dumpmachine\` 6 2` - # Setup platform XLEN, ABI, ISA and Code Model ifndef PLATFORM_RISCV_XLEN ifeq ($(OPENSBI_CC_XLEN), 32) |