RISC-V: Extend syntax for the multilib-generator
- Support expansion operator (*) in the multilib config string.
- Motivation of this patch is reduce the complexity when we deal multilib with
sub-extension, expand the combinations by hand would be very painful and
error prone, no one deserve to experience this[1] again!
[1] https://github.com/sifive/freedom-tools/blob/
f4d7facafb27d16125768c90ff1790c674e4be7a/Makefile#L348
gcc/ChangeLog:
* config/riscv/multilib-generator: Add TODO, import itertools
and functools.reduce.
Handle expantion operator.
(LONG_EXT_PREFIXES): New.
(arch_canonicalize): Update comment and improve python3
debuggability/compatibility.
(add_underline_prefix): New.
(_expand_combination): Ditto.
(unique): Ditto.
(expand_combination): Ditto.