]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix link failure of GNAT tools on 32-bit SPARC/Linux
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 29 May 2024 10:06:32 +0000 (12:06 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 29 May 2024 10:09:56 +0000 (12:09 +0200)
There is an incorrect binding to the 64-bit compare-and-exchange builtin.

gcc/ada/
PR ada/115270
* Makefile.rtl (PowerPC/Linux): Use libgnat/s-atopri__32.ads for
the 32-bit library.
(SPARC/Linux): Likewise.

gcc/ada/Makefile.rtl

index 570d0b2703d32c2dc03819e72bd37fed6ec900bd..0f5ebb87d7357272c39c3bf5a0d5a8f29a3ae14d 100644 (file)
@@ -2266,15 +2266,18 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
   system.ads<libgnat/system-linux-ppc.ads
 
   ifeq ($(strip $(filter-out powerpc64%,$(target_cpu))),)
-    ifneq ($(strip $(MULTISUBDIR)),/32)
+    ifeq ($(strip $(MULTISUBDIR)),/32)
+      LIBGNAT_TARGET_PAIRS += s-atopri.ads<libgnat/s-atopri__32.ads
+    else
       LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS)
       EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS)
     endif
   else
-    LIBGNAT_TARGET_PAIRS += s-atopri.ads<libgnat/s-atopri__32.ads
     ifeq ($(strip $(MULTISUBDIR)),/64)
       LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS)
       EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS)
+    else
+      LIBGNAT_TARGET_PAIRS += s-atopri.ads<libgnat/s-atopri__32.ads
     endif
   endif
 
@@ -2386,7 +2389,9 @@ ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
   system.ads<libgnat/system-linux-sparc.ads
 
   ifeq ($(strip $(filter-out sparc64 sparcv9,$(target_cpu))),)
-    ifneq ($(strip $(MULTISUBDIR)),/32)
+    ifeq ($(strip $(MULTISUBDIR)),/32)
+      LIBGNAT_TARGET_PAIRS += s-atopri.ads<libgnat/s-atopri__32.ads
+    else
       LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS)
       EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS)
     endif
@@ -2394,6 +2399,8 @@ ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
     ifeq ($(strip $(MULTISUBDIR)),/64)
       LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS)
       EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS)
+    else
+      LIBGNAT_TARGET_PAIRS += s-atopri.ads<libgnat/s-atopri__32.ads
     endif
   endif