riscv: Explicitly pass -march and -mabi to the compiler
authorBin Meng <bmeng.cn@gmail.com>
Wed, 26 Sep 2018 13:55:13 +0000 (06:55 -0700)
committerAndes <uboot@andestech.com>
Wed, 3 Oct 2018 09:47:43 +0000 (17:47 +0800)
commitce7a8e0740f1f9ec915109392184d335ba231448
treede9a9a5c0811e6e59f40a39faf3db60cb143250d
parent3d6015651bcb09d2a26e325e533c78525140d613
riscv: Explicitly pass -march and -mabi to the compiler

At present the compiler flag against which architecture and abi
variant the riscv image is built for is not explicitly indicated
which means the default compiler configuration is used. But this
does not work if we want to build a different target (eg: 32-bit
riscv images using a toolchain configured for 64-bit riscv).

Fix this by explicitly passing -march and -mabi to the compiler.
Since generically we don't use floating point in U-Boot, specify
the RV[32|64]IMA ISA and software floating ABI.

This also fix some alignment coding style issues.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
arch/riscv/config.mk