]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Set target_cpu to x32 for x86_64-linux-gnux32
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 18 Jan 2022 23:54:35 +0000 (15:54 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Jan 2022 14:39:04 +0000 (06:39 -0800)
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.

(cherry picked from commit 2cef99175af1ad95283d4b35bced73c3a510f6d6)

gcc/ada/gcc-interface/Makefile.in

index 3342e33b4b17d439a4c1185ad4d309fbb3ff02f9..e0ca7cc4e8a6af3644a42595b08f46435fe8bcde 100644 (file)
@@ -348,6 +348,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
+
 # Configuration of host tools
 
 # Under linux, host tools need to be linked with -ldl