RISC-V multilib supports extra options for fine-grained configuration.
RISC-V multilib-generator now accepts additional options in its configuration string, allowing for more specific multilib builds.
The RISC-V multilib-generator now supports an expanded syntax that includes optional extra arguments for build configurations. This allows developers to specify additional compiler options, such as -fcf-protection=full, directly within the multilib string. This enhancement provides greater flexibility in tailoring multilib builds for various RISC-V architecture and feature combinations.
In Details
This change extends the <extra-options> syntax for the multilib-generator in GCC's RISC-V backend. It allows for the inclusion of arbitrary -f options, encoded with underscores instead of hyphens and a leading dash skipped (e.g., fcf_protection=full), alongside the multilib folder specification. This impacts the config/riscv/multilib-generator script and the documentation in doc/install.texi for the --with-multilib-generator flag.
For Context
Compilers often support 'multilibs,' which are multiple versions of libraries built for different architectural variants or compiler options. This allows a single GCC installation to support various target configurations. For the RISC-V architecture, this commit enhances the multilib-generator that creates these specialized libraries. It introduces a new, more flexible way to specify build options directly within the multilib configuration string. This means developers can now include specific compiler flags, like -fcf-protection=full, to build libraries tailored to very particular hardware features or security requirements. This offers more fine-grained control over the generated libraries.