Index: 14.2.0/Makefile
===================================================================
--- 14.2.0/Makefile (revision 57)
+++ 14.2.0/Makefile (revision 58)
@@ -428,6 +428,7 @@
extra_configure_switches += --enable-multilib
extra_configure_switches += --with-abi=lp64d
extra_configure_switches += --with-arch=rv64imafdc
+extra_configure_switches += --with-isa-spec=2.2
extra_configure_switches += --with-dwarf2
extra_configure_switches += --disable-isl-version-check
extra_configure_switches += --disable-libstdcxx-pch
@@ -2191,6 +2192,7 @@
extra_configure_switches += --disable-multilib
extra_configure_switches += --with-abi=lp64d
extra_configure_switches += --with-arch=rv64imafdc
+extra_configure_switches += --with-isa-spec=2.2
extra_configure_switches += --enable-tls
extra_configure_switches += --disable-tm-clone-registry
extra_configure_switches += --disable-isl-version-check
@@ -2431,6 +2433,13 @@
$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
$(UNPACK_SRC_ARCHIVE)
$(APPLY_PATCHES)
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_RISCV64_NEWLIB))
+ @( cp $(CURDIR)/generate-riscv-multilib-file $(SRC_DIR)/gcc/config/riscv/ ; \
+ cd $(SRC_DIR)/gcc/config/riscv/ ; \
+ chmod a+x generate-riscv-multilib-file ; \
+ ./generate-riscv-multilib-file ; \
+ )
+endif
@touch $@
$(gmp_src_done): $(src_done)
Index: 14.2.0/generate-riscv-multilib-file
===================================================================
--- 14.2.0/generate-riscv-multilib-file (nonexistent)
+++ 14.2.0/generate-riscv-multilib-file (revision 58)
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+#
+# https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/tag/v14.2.0-2
+#
+GCC_MULTILIB_LIST=${GCC_MULTILIB_LIST:-"\
+ rv32e-ilp32e--c \
+ rv32ea-ilp32e--m \
+ rv32em-ilp32e--c \
+ rv32eac-ilp32e-- \
+ rv32emac-ilp32e-- \
+ \
+ rv32i-ilp32--c \
+ rv32ia-ilp32--m \
+ rv32im-ilp32--c \
+ rv32if-ilp32f-rv32ifd-c \
+ rv32iaf-ilp32f-rv32imaf,rv32iafc-d \
+ rv32imf-ilp32f-rv32imfd-c \
+ rv32iac-ilp32-- \
+ rv32imac-ilp32-- \
+ rv32imafc-ilp32f-rv32imafdc- \
+ rv32ifd-ilp32d--c \
+ rv32imfd-ilp32d--c \
+ rv32iafd-ilp32d-rv32imafd,rv32iafdc- \
+ rv32imafdc-ilp32d-- \
+ \
+ rv64i-lp64--c \
+ rv64ia-lp64--m \
+ rv64im-lp64--c \
+ rv64if-lp64f-rv64ifd-c \
+ rv64iaf-lp64f-rv64imaf,rv64iafc-d \
+ rv64imf-lp64f-rv64imfd-c \
+ rv64iac-lp64-- rv64imac-lp64-- \
+ rv64imafc-lp64f-rv64imafdc- \
+ rv64ifd-lp64d--m,c \
+ rv64iafd-lp64d-rv64imafd,rv64iafdc- \
+ rv64imafdc-lp64d-- \
+ "}
+
+
+generate_multilib_file()
+{
+ # Not inside the previous if to allow multilib changes after download.
+ if [ "${WITHOUT_MULTILIB}" != "y" ]
+ then
+ (
+ echo
+ echo "Running the multilib generator..."
+
+ GCC_MULTILIB_FILE=${GCC_MULTILIB_FILE:-"t-elf-multilib"}
+
+ # Be sure the ${GCC_MULTILIB_LIST} has no quotes, since it defines
+ # multiple strings.
+
+ # Change IFS temporarily so that we can pass a simple string of
+ # whitespace delimited multilib tokens to multilib-generator
+ local IFS=$' '
+ echo
+ echo "[python3 ./multilib-generator ${GCC_MULTILIB_LIST}]"
+ python3 ./multilib-generator ${GCC_MULTILIB_LIST} > "${GCC_MULTILIB_FILE}"
+
+ echo "----------------------------------------------------------------"
+ cat "${GCC_MULTILIB_FILE}"
+ echo "----------------------------------------------------------------"
+ )
+ fi
+}
+
+generate_multilib_file