RISC-V: Add configure option: --with-multilib-generator to flexible config multi...
authorKito Cheng <kito.cheng@sifive.com>
Fri, 19 Jun 2020 07:36:23 +0000 (00:36 -0700)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 2 Nov 2020 09:00:51 +0000 (17:00 +0800)
commitc1e6691245ca2f1f329549f323f67afe32bcb97a
tree5c73db096ab8cbb7c31931592b72f253e2449a23
parentc3c3e2c9e88e25a410a2fe089782b094e911bb39
RISC-V: Add configure option: --with-multilib-generator to flexible config multi-lib settings.

 - Able to configure complex multi-lib rule in configure time, without modify
   any in-tree source.

 - I was consider to implmenet this into `--with-multilib-list` option,
   but I am not sure who will using that with riscv*-*-elf*, so I decide to
   using another option name for that.

 - --with-multilib-generator will pass arguments to multilib-generator, and
   then using the generated multi-lib config file to build the toolchain.

   e.g. Build riscv gcc, default arch/abi is rv64gc/lp64, and build multilib
       for rv32imafd/ilp32 and rv32i/ilp32; rv32ic/ilp32 will reuse
       rv32i/ilp32.
    $ <GCC-SRC>/configure \
       --target=riscv64-elf \
       --with-arch=rv64gc --with-abi=lp64 \
       --with-multilib-generator=rv32i-ilp32--c;rv32imafd-ilp32--

V3 Changes:

 - Rename --with-multilib-config to --with-multilib-generator
 - Check --with-multilib-generator and --with-multilib-list can't be used at
   same time.

V2 Changes:

 - Fix --with-multilib-config hanling on non riscv*-*-elf* triple.

gcc/ChangeLog:

* config.gcc (riscv*-*-*): Handle --with-multilib-generator.
* configure: Regen.
* configure.ac: Add --with-multilib-generator.
* config/riscv/multilib-generator: Exit when parsing arch string error.
* config/riscv/t-withmultilib-generator: New.
* doc/install.texi: Document --with-multilib-generator.
gcc/config.gcc
gcc/config/riscv/multilib-generator
gcc/config/riscv/t-withmultilib-generator [new file with mode: 0644]
gcc/configure
gcc/configure.ac
gcc/doc/install.texi