I tried to build a riscv-rtems5 GCC using Binutils 2.31.1 and a recent GCC 9. There are several configure tests in GCC which test gas features. They fail now with a "Error: unknown default architecture `'" error message (about 30 tests), e.g.
configure:24456: checking assembler for thread-local storage support
configure:24469: /build/rtems/5/riscv-rtems5/bin/as --fatal-warnings -o conftest.o conftest.s >&5
Error: unknown default architecture `'
configure:24472: $? = 1
configure: failed program was
x: .word 2
gas/configure.tgt only knows about riscv32 and riscv64. Another reason why the introduction of a riscv cpu was a mistake. config.sub really should canonicalize riscv into riscv32.
I am not sure at which level this should be fixed now.
I did a build test, but I see now that it builds but doesn't run. Annoying, but this is easy to fix.
I regularly test riscv32-* and riscv64-* as these are the officially supported targets, but I'm not interested in testing riscv-*. Use riscv-* at your own risk.
We got in the current situation because of two main reasons.
1) There is a person (not Sebastian) willing to annoy people until he gets what he wants, and has spent so much time annoying so many people to get riscv-* that at least one key person has given up trying to fight him.
2) Both Sebatian and Ben Ellison were on vacation at the same time right before the last binutils release, limiting my options for late configure related fixes before the release.
I don't like making non-backward compatible changes. Also, if we remove it, we have to start fighting a certain person again. I'm willing to do that, but it will be hard now that some people have given up the fight. So I think we are stuck with riscv-* for now. I won't be testing it, but I will fix bugs when they are reported against it.
I took a week of vacation, and forgot how to do binutils work. Specifically, I forgot to include the bugzilla number in the ChangeLog entry. The patch is here
it is only on mainline for now. We probably need to backport.
Thanks, for the fix.
The tools did build fine with this error. I only noticed the problem due to some TLS test run-time failures since emutls was picked up by GCC.