Makefile: Add option to use toolchain default ABI and ISA string
authorAnup Patel <anup.patel@wdc.com>
Tue, 20 Oct 2020 04:59:43 +0000 (10:29 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 2 Nov 2020 03:51:50 +0000 (09:21 +0530)
commit914f81fbee28da409eac680ab3e76f1d5982c6e7
treea9302c40e5d61927ed6195719ad963dab3c87e2b
parenta809f406b97cdd699f49a977f031ae9c864fe5c3
Makefile: Add option to use toolchain default ABI and ISA string

When PLATFORM_RISCV_ABI and PLATFORM_RISCV_ISA are not specified,
we force "-mabi=lp64 -march=rv64gc" for RV64 and force "-mabi=ilp32
-march=rv32gc" for RV32. This can prevent users from using the
toolchain default "-mabi" and "-march" options.

To allow using toolchain defaults, we add compile-time option
PLATFORM_RISCV_TOOLCHAIN_DEFAULT which when enabled forces the
top-level makefile to use toolchain default ABI and ISA string.

To enable the option, pass "PLATFORM_RISCV_TOOLCHAIN_DEFAULT=1"
to top-level make.

Reported-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Makefile