[gcc(refs/users/aoliva/heads/testme)] Introduce x86_64-linux-gnum32
Alexandre Oliva
aoliva@gcc.gnu.org
Tue Nov 18 00:30:38 GMT 2025
https://gcc.gnu.org/g:cb8e17299c55cac0818b13c4dd612a35f622fd14
commit cb8e17299c55cac0818b13c4dd612a35f622fd14
Author: Olivier Hainque <hainque@adacore.com>
Date: Mon Oct 27 20:16:56 2025 -0300
Introduce x86_64-linux-gnum32
Enable a 32-bit "native" toolchain to be built on x86_64-linux-gnu,
i.e., one that targets -m32 despite running in 64-bit mode. Neither
multilibs nor -m64 support are desired for this configuration (a
multilibbed x86_64-linux-gnu native, defaulting to -m32 through self
specs would accomplish those).
for gcc/ChangeLog
* config.gcc [x86_64-*-*]: Match *m32 target, default to m32
abi and multilib. Accept 32 or m32 for --with-abi.
Diff:
---
gcc/config.gcc | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index d2770ea556b2..952499b494c1 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -676,6 +676,29 @@ i[34567]86-*-*)
x86_64-*-darwin*)
;;
x86_64-*-*)
+ # Pick a default with_abi and with_multilib_list for m32
+ # restricted toolchains
+ case ${target} in
+ *m32)
+ case ${with_abi} in
+ "" | 32 | m32)
+ with_abi=m32
+ ;;
+ *)
+ echo "Invalid --with-abi=$with_abi for m32 target"
+ exit 1
+ esac
+ case ${with_multilib_list} in
+ default | m32)
+ with_multilib_list=m32
+ ;;
+ *)
+ echo "Invalid multilib list for m32 target"
+ exit 1
+ esac
+ ;;
+ esac
+
case ${with_abi} in
"")
if test "x$with_multilib_list" = xmx32; then
@@ -690,6 +713,8 @@ x86_64-*-*)
x32 | mx32)
tm_file="i386/biarchx32.h ${tm_file}"
;;
+ 32 | m32)
+ ;;
*)
echo "Unknown ABI used in --with-abi=$with_abi"
exit 1
More information about the Gcc-cvs
mailing list