[gcc(refs/users/aoliva/heads/testme)] set up gnattools to use -cross
Alexandre Oliva
aoliva@gcc.gnu.org
Sat Dec 13 08:46:36 GMT 2025
https://gcc.gnu.org/g:52a1a8ff664dd62b327499894f78d75845535cec
commit 52a1a8ff664dd62b327499894f78d75845535cec
Author: Alexandre Oliva <oliva@gnu.org>
Date: Sat Dec 13 04:11:10 2025 -0300
set up gnattools to use -cross
Diff:
---
gnattools/configure | 10 ++++++++++
gnattools/configure.ac | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/gnattools/configure b/gnattools/configure
index b3b6aab1b72e..a089a034ca16 100755
--- a/gnattools/configure
+++ b/gnattools/configure
@@ -3683,6 +3683,16 @@ fi
# ../gcc/ada/gcc-interface/config-lang.in as well.
if test "x$cross_compiling/$build/$host" = "xno/$host/$target" ; then
default_gnattools_target="gnattools-native"
+ # When natively-building x86_64-*-gnum32 tools without bootstrap,
+ # use the native toolchain to build gnattools, expecting its
+ # libraries to be compatible with whichever multilib was used to
+ # build other tools. This requires the compiler being built to be
+ # gnatbind-compatible with the one used for the build.
+ case $enable_bootstrap/$target in
+ no/x86_64-*-gnum32)
+ default_gnattools_target="gnattools-cross"
+ ;;
+ esac
else
default_gnattools_target="gnattools-cross"
fi
diff --git a/gnattools/configure.ac b/gnattools/configure.ac
index ff07179b3ba8..adbdc8996db6 100644
--- a/gnattools/configure.ac
+++ b/gnattools/configure.ac
@@ -125,6 +125,16 @@ AC_SUBST(LD_PICFLAG)
# ../gcc/ada/gcc-interface/config-lang.in as well.
if test "x$cross_compiling/$build/$host" = "xno/$host/$target" ; then
default_gnattools_target="gnattools-native"
+ # When natively-building x86_64-*-gnum32 tools without bootstrap,
+ # use the native toolchain to build gnattools, expecting its
+ # libraries to be compatible with whichever multilib was used to
+ # build other tools. This requires the compiler being built to be
+ # gnatbind-compatible with the one used for the build.
+ case $enable_bootstrap/$target in
+ no/x86_64-*-gnum32)
+ default_gnattools_target="gnattools-cross"
+ ;;
+ esac
else
default_gnattools_target="gnattools-cross"
fi
More information about the Gcc-cvs
mailing list