public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Fix PR ada/115270
@ 2024-05-29 10:11 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2024-05-29 10:11 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

This fixes the link failure of the GNAT tools on 32-bit SPARC/Linux (as well 
as on 32-bit PowerPC/Linux probably) coming from an incorrect binding to the 
64-bit compare-and-exchange builtin.

Tested by Rainer on 32-bit SPARC/Linux, applied on mainline and 14 branch.


2024-05-29  Eric Botcazou  <ebotcazou@adacore.com>

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

-- 
Eric Botcazou

[-- Attachment #2: pr115270.diff --]
[-- Type: text/x-patch, Size: 1821 bytes --]

diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 570d0b2703d..0f5ebb87d73 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -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
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-29 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-29 10:11 [Ada] Fix PR ada/115270 Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).