From 2cef99175af1ad95283d4b35bced73c3a510f6d6 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 18 Jan 2022 15:54:35 -0800 Subject: [PATCH] [Ada] Set target_cpu to x32 for x86_64-linux-gnux32 Since the x86_64-linux-gnux32 compiler is actually an x32 compiler, set target_cpu to x32 for x86_64-linux-gnux32. PR ada/103538 * gcc-interface/Makefile.in (target_cpu): Set to x32 for x86_64-linux-gnux32. --- gcc/ada/gcc-interface/Makefile.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 53d0739..b8a2470 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -350,6 +350,13 @@ ifeq ($(strip $(filter-out x86_64, $(target_cpu))),) endif endif +# The x86_64-linux-gnux32 compiler is actually an x32 compiler +ifeq ($(strip $(filter-out x86_64 linux-gnux32%, $(target_cpu) $(target_os))),) + ifneq ($(strip $(MULTISUBDIR)),/64) + target_cpu:=x32 + endif +endif + # The SuSE PowerPC64/Linux compiler is actually a 32-bit PowerPC compiler ifeq ($(strip $(filter-out powerpc64 suse linux%, $(target_cpu) $(target_vendor) $(target_os))),) target_cpu:=powerpc -- 2.7.4