commit:     b42744dd8d41b9a471b0f99fe8d9e7cb8f806a9a
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 28 10:23:34 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr 28 10:23:34 2019 +0000
URL:        https://gitweb.gentoo.org/proj/riscv.git/commit/?id=b42744dd

eclass: filter -march in gcc build for riscv

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 eclass/toolchain.eclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index be94db8..ff66986 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1513,6 +1513,11 @@ gcc_do_filter_flags() {
        # dont want to funk ourselves
        filter-flags '-mabi*' -m31 -m32 -m64
 
+       # on riscv, only specific combinations of march and mabi work... so we 
need
+       # to strip both and trust the compiler to do the right thing, otherwise
+       # multilib build fails
+       [[ $(tc-arch) == riscv* ]] && filter-flags '-march*'
+
        filter-flags -frecord-gcc-switches # 490738
        filter-flags -mno-rtm -mno-htm # 506202
 

Reply via email to