From d8367667ea2cd6e3de1d07548ee5d4f0f603b5d6 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Mon, 6 Jul 2015 17:23:40 -0700 Subject: [PATCH] Make GCC pass through non-standard ISA strings This simply stops GCC's parse whenever it sees an 'X' in an ISA string. This is the best I can do until some clarafications are made to the RISC-V user spec that allows ISA extensions to be parsed. --- gcc/gcc/common/config/riscv/riscv-common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/gcc/common/config/riscv/riscv-common.c b/gcc/gcc/common/config/riscv/riscv-common.c index 921957ae..5bb2218a 100644 --- a/gcc/gcc/common/config/riscv/riscv-common.c +++ b/gcc/gcc/common/config/riscv/riscv-common.c @@ -76,6 +76,12 @@ riscv_parse_arch_string (const char *isa, int *flags) if (*p == 'C') *flags |= MASK_RVC, p++; + /* FIXME: For now we just stop parsing when faced with a + non-standard RISC-V ISA extension, partially becauses of a + problem with the naming scheme. */ + if (*p == 'X') + return; + if (*p) { error ("-march=%s: unsupported ISA substring %s", isa, p);