tmake_file="${tmake_file} riscv/t-rtems"
;;
*)
- case "x${enable_multilib}" in
- xno) ;;
- xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
- *) echo "Unknown value for enable_multilib"; exit 1
- esac
+ if test "x${with_multilib_generator}" == xdefault; then
+ case "x${enable_multilib}" in
+ xno) ;;
+ xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
+ *) echo "Unknown value for enable_multilib"; exit 1
+ esac
+ fi
esac
tmake_file="${tmake_file} riscv/t-riscv"
gnu_ld=yes
exit 1
;;
esac
+ # Handle --with-multilib-generator.
+ if test "x${with_multilib_generator}" != xdefault; then
+ if test "x${with_multilib_list}" != xdefault; then
+ echo "--with-multilib-list= can't used with --with-multilib-generator= at same time" 1>&2
+ exit 1
+ fi
+ case "${target}" in
+ riscv*-*-elf*)
+ if ${srcdir}/config/riscv/multilib-generator \
+ `echo ${with_multilib_generator} | sed 's/;/ /g'`\
+ > t-multilib-config;
+ then
+ tmake_file="${tmake_file} riscv/t-withmultilib-generator"
+ else
+ echo "invalid option for --with-multilib-generator" 1>&2
+ exit 1
+ fi
+ ;;
+ *)
+ echo "--with-multilib-generator= is not supported for ${target}, only supported for riscv*-*-elf*" 1>&2
+ exit 1
+ ;;
+ esac
+ fi
# Handle --with-multilib-list.
if test "x${with_multilib_list}" != xdefault; then
return ext
for cfg in sys.argv[1:]:
- (arch, abi, extra, ext) = cfg.split('-')
+ try:
+ (arch, abi, extra, ext) = cfg.split('-')
+ except:
+ print ("Invalid configure string %s, <arch>-<abi>-<extra>-<extensions>\n"
+ "<extra> and <extensions> can be empty, "
+ "e.g. rv32imafd-ilp32--" % cfg)
+ sys.exit(1)
+
arch = arch_canonicalize (arch)
arches[arch] = 1
abis[abi] = 1
--- /dev/null
+# t-multilib-config will generated in build folder by configure script.
+include t-multilib-config
with_changes_root_url
enable_languages
with_multilib_list
+with_multilib_generator
with_zstd
with_zstd_include
with_zstd_lib
--with-changes-root-url=URL
Root for GCC changes URLs
--with-multilib-list select multilibs (AArch64, SH and x86-64 only)
+ --with-multilib-generator
+ Multi-libs configuration string (RISC-V only)
--with-zstd=PATH specify prefix directory for installed zstd library.
Equivalent to --with-zstd-include=PATH/include plus
--with-zstd-lib=PATH/lib
fi
+
+# Check whether --with-multilib-generator was given.
+if test "${with_multilib_generator+set}" = set; then :
+ withval=$with_multilib_generator; :
+else
+ with_multilib_generator=default
+fi
+
+
# -------------------------
# Checks for other programs
# -------------------------
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19021 "configure"
+#line 19033 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19127 "configure"
+#line 19139 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
:,
with_multilib_list=default)
+AC_ARG_WITH(multilib-generator,
+[AS_HELP_STRING([--with-multilib-generator], [Multi-libs configuration string (RISC-V only)])],
+:,
+with_multilib_generator=default)
+
# -------------------------
# Checks for other programs
# -------------------------
64-bit run-time libraries will be enabled.
@end table
+@item --with-multilib-generator=@var{config}
+Specify what multilibs to build. @var{config} is a semicolon separated list of
+values, possibly consisting of a single value. Currently only implemented
+for riscv*-*-elf*. The accepted values and meanings are given below.
+
+
+Every config is constructed with four components: architecture string, ABI,
+reuse rule with architecture string and reuse rule with sub-extension.
+
+Example 1: Add multi-lib suppport for rv32i with ilp32.
+@smallexample
+rv32i-ilp32--
+@end smallexample
+
+Example 2: Add multi-lib suppport for rv32i with ilp32 and rv32imafd with ilp32.
+@smallexample
+rv32i-ilp32--;rv32imafd-ilp32--
+@end smallexample
+
+Example 3: Add multi-lib suppport for rv32i with ilp32; rv32im with ilp32 and
+rv32ic with ilp32 will reuse this multi-lib set.
+@smallexample
+rv32i-ilp32-rv32im-c
+@end smallexample
+
+Example 4: Add multi-lib suppport for rv64ima with lp64; rv64imaf with lp64,
+rv64imac with lp64 and rv64imafc with lp64 will reuse this multi-lib set.
+@smallexample
+rv64ima-lp64--f,c,fc
+@end smallexample
+
@item --with-endian=@var{endians}
Specify what endians to use.
Currently only implemented for sh*-*-*.