]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Add multiarch support on riscv-linux-gnu
authorRaphael Moreira Zinsly <rzinsly@ventanamicro.com>
Tue, 22 Aug 2023 17:37:04 +0000 (11:37 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Tue, 22 Aug 2023 17:37:04 +0000 (11:37 -0600)
This adds multiarch support to the RISC-V port so that bootstraps work with
Debian out-of-the-box.  Without this patch the stage1 compiler is unable to
find headers/libraries when building the stage1 runtime.

This is functionally (and possibly textually) equivalent to Debian's fix for
the same problem.

gcc/
* config/riscv/t-linux: Add MULTIARCH_DIRNAME.

gcc/config/riscv/t-linux

index 216d2776a183d13ade76642b73b9bf04b0c4694e..a6f64f88d25c989159207cbef19778b703c95797 100644 (file)
@@ -1,3 +1,5 @@
 # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
 MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
 MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
+
+MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -, ,$(target)))-linux-gnu)