This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][Ada] PR ada/5911 Enable multilib build for Ada


> 2008-09-18  Laurent Guerby  <laurent@guerby.net>
>
>         PR ada/5911
> 	* gcc-interface/Makefile.in: Add multilib handling for x86_64
> 	and sparc.
> 	* system-linux-sparcv9.ads: New file.

Here's the patch actually enabling multilib on SPARC/Solaris:

(botcazou@congo) ~ $ gnatmake ma -q -f
(botcazou@congo) ~ $ file ma
ma:             ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, 
dynamically linked, not stripped
(botcazou@congo) ~ $ gnatmake ma -q -f -m64 --RTS=sparcv9
(botcazou@congo) ~ $ file ma
ma:             ELF 64-bit MSB executable SPARCV9 Version 1, dynamically 
linked, not stripped

Tested on Solaris 9, applied on the mainline.


2008-09-26  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/5911
	* gcc-interface/Makefile.in (SPARC/Solaris): Add multilib support.


-- 
Eric Botcazou
Index: gcc-interface/Makefile.in
===================================================================
--- gcc-interface/Makefile.in	(revision 140680)
+++ gcc-interface/Makefile.in	(working copy)
@@ -763,9 +763,17 @@ ifeq ($(strip $(filter-out sparc% sun so
   system.ads<system-solaris-sparcv9.ads
 
   ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
-    LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
+    ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
+      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
+    else
+      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
+    endif
   else
-    LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
+    ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
+      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
+    else
+      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
+    endif
   endif
 
   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]