From 62569247f420ee58926726e2c988fcbefb958dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 5 Mar 2024 10:23:17 +0100 Subject: [PATCH] patch for adding/fixing RISC-V multiarch support --- ...GCCcore-12.x_riscv_multiarch_support.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/g/GCCcore/GCCcore-12.x_riscv_multiarch_support.patch diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-12.x_riscv_multiarch_support.patch b/easybuild/easyconfigs/g/GCCcore/GCCcore-12.x_riscv_multiarch_support.patch new file mode 100644 index 00000000000..ba981cea95c --- /dev/null +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-12.x_riscv_multiarch_support.patch @@ -0,0 +1,33 @@ +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=47f95bc4be4eb14730ab3eaaaf8f6e71fda47690 +https://gcc.gnu.org/PR106271 + +From 47f95bc4be4eb14730ab3eaaaf8f6e71fda47690 Mon Sep 17 00:00:00 2001 +From: Raphael Moreira Zinsly +Date: Tue, 22 Aug 2023 11:37:04 -0600 +Subject: [PATCH] RISC-V: Add multiarch support on riscv-linux-gnu + +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 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +index 216d2776a18..a6f64f88d25 100644 +--- a/gcc/config/riscv/t-linux ++++ b/gcc/config/riscv/t-linux +@@ -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) +-- +2.39.3