https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84797
--- Comment #2 from Jim Wilson <wilson at gcc dot gnu.org> --- Created attachment 43904 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43904&action=edit version 2 patch Missing documentation, doesn't handle architecture aliases, and only lets your specify one ABI, but otherwise seems to be working right. Configuring with --enable-multilib --with-multilib-list=lp64d --with-abi=lp64d --with-arch=rv64gc I get a compiler that does this gamma05:2013$ ./xgcc -B./ --print-multi-lib .; gamma05:2014$ ./xgcc -B./ --print-multi-dir . gamma05:2015$ ./xgcc -B./ --print-multi-os-directory ../lib64/lp64d gamma05:2016$ So one multilib was built, and it was installed into lib64/lp64d where we want it. The --print-multi-dir value shouldn't matter. Most ports only select multilibs based on two options. The RISC-V port uses two options to select multilibs, which makes specifying this stuff a lot more complicated. This is why I'm only allowing one ABI choice at the moment. I see I forgot to cleanup the t-linux-withmultilib file. I will do that in the next version of the patch.