public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
@ 2008-09-30 20:21 Rainer Orth
  2008-10-01  8:11 ` Paolo Bonzini
       [not found] ` <200809302327.22751.ebotcazou@adacore.com>
  0 siblings, 2 replies; 14+ messages in thread
From: Rainer Orth @ 2008-09-30 20:21 UTC (permalink / raw)
  To: gcc-patches

As reported in PR ada/37681, the 64-bit libada fails to build on Solaris
10/x86 due to lack of multilib support for that configuration.  The
following patch fixes this.  It allowed the bootstrap to complete and built
both 32-bit and 64-bit Ada runtime libs.  No regressions in testing, though
ACATS testing isn't multilib aware yet and gnat testing seems to use the
wrong system.ads, yielding errors like the following:

Running /vol/gcc/src/gcc-dist/gcc/testsuite/gnat.dg/dg.exp ...
Executing on host: /vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc/gnatmake -I/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc/ada/rts --GCC=/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc/xgcc --GNATBIND=/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc/gnatbind --GNATLINK=/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc/gnatlink -cargs -B/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc -largs --GCC=/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc/xgcc -B/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc -margs -q -f /vol/gcc/src/gcc-dist/gcc/testsuite/gnat.dg/abstract1.adb  -c -I/vol/gccsrc/obj/gcc-4.4.0-20080929/10-gcc/gcc/ada/rts -S  -m64 -o abstract1.s    (timeout = 300)
abstract1.ads:3:09: alignment for "tb35s" must be at least 8
abstract1.ads:3:09: alignment for "tr33s" must be at least 8
abstract1.ads:3:09: alignment for "tt30s" must be at least 8
abstract1.ads:10:09: alignment for "itb60s" must be at least 8
abstract1.ads:10:09: alignment for "itr58s" must be at least 8
abstract1.ads:10:09: alignment for "itt55s" must be at least 8
abstract1.ads:15:09: alignment for "ftb86s" must be at least 8
abstract1.ads:15:09: alignment for "ftr84s" must be at least 8
abstract1.ads:15:09: alignment for "ftt81s" must be at least 8
gnatmake: "/vol/gcc/src/gcc-dist/gcc/testsuite/gnat.dg/abstract1.adb" compilation error

Anyway, the patch fixes a bootstrap failure and is progress from the
current state of affairs.

Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Tue Sep 30 17:07:09 2008  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	PR ada/37681
	* system-solaris-x86_64.ads: New file.
	* gcc-interface/Makefile.in (*86-solaris2*): Support x86_64
	multilib.

Index: gcc/ada/system-solaris-x86_64.ads
===================================================================
--- gcc/ada/system-solaris-x86_64.ads	(revision 0)
+++ gcc/ada/system-solaris-x86_64.ads	(revision 0)
@@ -0,0 +1,147 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                        GNAT RUN-TIME COMPONENTS                          --
+--                                                                          --
+--                               S Y S T E M                                --
+--                                                                          --
+--                                 S p e c                                  --
+--                        (x86-64 Solaris Version)                          --
+--                                                                          --
+--          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--                                                                          --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the  contents of the part following the private keyword. --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNAT;  see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package System is
+   pragma Pure;
+   --  Note that we take advantage of the implementation permission to make
+   --  this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+   --  2005, this is Pure in any case (AI-362).
+
+   type Name is (SYSTEM_NAME_GNAT);
+   System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+   --  System-Dependent Named Numbers
+
+   Min_Int               : constant := Long_Long_Integer'First;
+   Max_Int               : constant := Long_Long_Integer'Last;
+
+   Max_Binary_Modulus    : constant := 2 ** Long_Long_Integer'Size;
+   Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+   Max_Base_Digits       : constant := Long_Long_Float'Digits;
+   Max_Digits            : constant := Long_Long_Float'Digits;
+
+   Max_Mantissa          : constant := 63;
+   Fine_Delta            : constant := 2.0 ** (-Max_Mantissa);
+
+   Tick                  : constant := 0.01;
+
+   --  Storage-related Declarations
+
+   type Address is private;
+   pragma Preelaborable_Initialization (Address);
+   Null_Address : constant Address;
+
+   Storage_Unit : constant := 8;
+   Word_Size    : constant := 64;
+   Memory_Size  : constant := 2 ** 64;
+
+   --  Address comparison
+
+   function "<"  (Left, Right : Address) return Boolean;
+   function "<=" (Left, Right : Address) return Boolean;
+   function ">"  (Left, Right : Address) return Boolean;
+   function ">=" (Left, Right : Address) return Boolean;
+   function "="  (Left, Right : Address) return Boolean;
+
+   pragma Import (Intrinsic, "<");
+   pragma Import (Intrinsic, "<=");
+   pragma Import (Intrinsic, ">");
+   pragma Import (Intrinsic, ">=");
+   pragma Import (Intrinsic, "=");
+
+   --  Other System-Dependent Declarations
+
+   type Bit_Order is (High_Order_First, Low_Order_First);
+   Default_Bit_Order : constant Bit_Order := Low_Order_First;
+   pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+   --  Priority-related Declarations (RM D.1)
+
+   Max_Priority           : constant Positive := 30;
+   Max_Interrupt_Priority : constant Positive := 31;
+
+   subtype Any_Priority       is Integer      range  0 .. 31;
+   subtype Priority           is Any_Priority range  0 .. 30;
+   subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+   Default_Priority : constant Priority := 15;
+
+private
+
+   type Address is mod Memory_Size;
+   Null_Address : constant Address := 0;
+
+   --------------------------------------
+   -- System Implementation Parameters --
+   --------------------------------------
+
+   --  These parameters provide information about the target that is used
+   --  by the compiler. They are in the private part of System, where they
+   --  can be accessed using the special circuitry in the Targparm unit
+   --  whose source should be consulted for more detailed descriptions
+   --  of the individual switch values.
+
+   Backend_Divide_Checks     : constant Boolean := False;
+   Backend_Overflow_Checks   : constant Boolean := False;
+   Command_Line_Args         : constant Boolean := True;
+   Configurable_Run_Time     : constant Boolean := False;
+   Denorm                    : constant Boolean := True;
+   Duration_32_Bits          : constant Boolean := False;
+   Exit_Status_Supported     : constant Boolean := True;
+   Fractional_Fixed_Ops      : constant Boolean := False;
+   Frontend_Layout           : constant Boolean := False;
+   Machine_Overflows         : constant Boolean := False;
+   Machine_Rounds            : constant Boolean := True;
+   Preallocated_Stacks       : constant Boolean := False;
+   Signed_Zeros              : constant Boolean := True;
+   Stack_Check_Default       : constant Boolean := False;
+   Stack_Check_Probes        : constant Boolean := True;
+   Stack_Check_Limits        : constant Boolean := False;
+   Support_64_Bit_Divides    : constant Boolean := True;
+   Support_Aggregates        : constant Boolean := True;
+   Support_Composite_Assign  : constant Boolean := True;
+   Support_Composite_Compare : constant Boolean := True;
+   Support_Long_Shifts       : constant Boolean := True;
+   Always_Compatible_Rep     : constant Boolean := False;
+   Suppress_Standard_Library : constant Boolean := False;
+   Use_Ada_Main_Program_Name : constant Boolean := False;
+   ZCX_By_Default            : constant Boolean := True;
+   GCC_ZCX_Support           : constant Boolean := True;
+
+end System;
Index: gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc/ada/gcc-interface/Makefile.in	(revision 140759)
+++ gcc/ada/gcc-interface/Makefile.in	(working copy)
@@ -810,7 +810,7 @@ ifeq ($(strip $(filter-out sparc% sun so
 endif
 
 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
-  LIBGNAT_TARGET_PAIRS = \
+  LIBGNAT_TARGET_PAIRS_32 = \
   a-numaux.adb<a-numaux-x86.adb \
   a-numaux.ads<a-numaux-x86.ads \
   a-intnam.ads<a-intnam-solaris.ads \
@@ -828,6 +828,30 @@ ifeq ($(strip $(filter-out %86 solaris2%
   g-soliop.ads<g-soliop-solaris.ads \
   system.ads<system-solaris-x86.ads
 
+  LIBGNAT_TARGET_PAIRS_64 = \
+  a-numaux.adb<a-numaux-x86.adb \
+  a-numaux.ads<a-numaux-x86.ads \
+  a-intnam.ads<a-intnam-solaris.ads \
+  s-inmaop.adb<s-inmaop-posix.adb \
+  s-intman.adb<s-intman-solaris.adb \
+  s-osinte.adb<s-osinte-solaris.adb \
+  s-osinte.ads<s-osinte-solaris.ads \
+  s-osprim.adb<s-osprim-solaris.adb \
+  s-taprop.adb<s-taprop-solaris.adb \
+  s-tasinf.adb<s-tasinf-solaris.adb \
+  s-tasinf.ads<s-tasinf-solaris.ads \
+  s-taspri.ads<s-taspri-solaris.ads \
+  s-tpopsp.adb<s-tpopsp-solaris.adb \
+  g-bytswa.adb<g-bytswa-x86.adb \
+  g-soliop.ads<g-soliop-solaris.ads \
+  system.ads<system-solaris-x86_64.ads
+
+  ifeq ($(strip $(MULTISUBDIR)),/amd64)
+    LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
+  else
+    LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
+  endif
+
   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
 
   EH_MECHANISM=-gcc

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-09-30 20:21 PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681) Rainer Orth
@ 2008-10-01  8:11 ` Paolo Bonzini
  2008-10-01  8:17   ` Paolo Bonzini
                     ` (2 more replies)
       [not found] ` <200809302327.22751.ebotcazou@adacore.com>
  1 sibling, 3 replies; 14+ messages in thread
From: Paolo Bonzini @ 2008-10-01  8:11 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches


>  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
> -  LIBGNAT_TARGET_PAIRS = \
> +  LIBGNAT_TARGET_PAIRS_32 = \
>    a-numaux.adb<a-numaux-x86.adb \
>    a-numaux.ads<a-numaux-x86.ads \
>    a-intnam.ads<a-intnam-solaris.ads \
> @@ -828,6 +828,30 @@ ifeq ($(strip $(filter-out %86 solaris2%
>    g-soliop.ads<g-soliop-solaris.ads \
>    system.ads<system-solaris-x86.ads
>  
> +  LIBGNAT_TARGET_PAIRS_64 = \
> +  a-numaux.adb<a-numaux-x86.adb \
> +  a-numaux.ads<a-numaux-x86.ads \

Can you do like http://permalink.gmane.org/gmane.comp.gcc.patches/172865
and merge the common bits into a LIBGNAT_TARGET_PAIRS_COMMON variable?

Thanks,

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01  8:11 ` Paolo Bonzini
@ 2008-10-01  8:17   ` Paolo Bonzini
  2008-10-01  8:39   ` Arnaud Charlet
  2008-10-01 17:15   ` Rainer Orth
  2 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2008-10-01  8:17 UTC (permalink / raw)
  To: gcc-patches; +Cc: gcc-patches


>  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
> -  LIBGNAT_TARGET_PAIRS = \
> +  LIBGNAT_TARGET_PAIRS_32 = \
>    a-numaux.adb<a-numaux-x86.adb \
>    a-numaux.ads<a-numaux-x86.ads \
>    a-intnam.ads<a-intnam-solaris.ads \
> @@ -828,6 +828,30 @@ ifeq ($(strip $(filter-out %86 solaris2%
>    g-soliop.ads<g-soliop-solaris.ads \
>    system.ads<system-solaris-x86.ads
>  
> +  LIBGNAT_TARGET_PAIRS_64 = \
> +  a-numaux.adb<a-numaux-x86.adb \
> +  a-numaux.ads<a-numaux-x86.ads \

Can you do like http://permalink.gmane.org/gmane.comp.gcc.patches/172865
and merge the common bits into a LIBGNAT_TARGET_PAIRS_COMMON variable?

Thanks,

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01  8:11 ` Paolo Bonzini
  2008-10-01  8:17   ` Paolo Bonzini
@ 2008-10-01  8:39   ` Arnaud Charlet
  2008-10-01 17:07     ` Rainer Orth
  2008-10-01 17:15   ` Rainer Orth
  2 siblings, 1 reply; 14+ messages in thread
From: Arnaud Charlet @ 2008-10-01  8:39 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Rainer Orth, gcc-patches

> >  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
> > -  LIBGNAT_TARGET_PAIRS = \
> > +  LIBGNAT_TARGET_PAIRS_32 = \
> >    a-numaux.adb<a-numaux-x86.adb \
> >    a-numaux.ads<a-numaux-x86.ads \
> >    a-intnam.ads<a-intnam-solaris.ads \
> > @@ -828,6 +828,30 @@ ifeq ($(strip $(filter-out %86 solaris2%
> >    g-soliop.ads<g-soliop-solaris.ads \
> >    system.ads<system-solaris-x86.ads
> >  
> > +  LIBGNAT_TARGET_PAIRS_64 = \
> > +  a-numaux.adb<a-numaux-x86.adb \
> > +  a-numaux.ads<a-numaux-x86.ads \
> 
> Can you do like http://permalink.gmane.org/gmane.comp.gcc.patches/172865
> and merge the common bits into a LIBGNAT_TARGET_PAIRS_COMMON variable?

Also, the change looks incorrect to me, at least the use of g-bytswa-x86.adb
is likely incorrect on x86_64.

Arno

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
       [not found] ` <200809302327.22751.ebotcazou@adacore.com>
@ 2008-10-01 16:44   ` Rainer Orth
  2008-10-10 15:02   ` Rainer Orth
  1 sibling, 0 replies; 14+ messages in thread
From: Rainer Orth @ 2008-10-01 16:44 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches

Eric Botcazou writes:

> > As reported in PR ada/37681, the 64-bit libada fails to build on Solaris
> > 10/x86 due to lack of multilib support for that configuration.  The
> > following patch fixes this.  It allowed the bootstrap to complete and built
> > both 32-bit and 64-bit Ada runtime libs.  No regressions in testing, though
> > ACATS testing isn't multilib aware yet and gnat testing seems to use the
> > wrong system.ads, yielding errors like the following:
> 
> You need to pass --RTS=amd64 in addition to -m64 for the time being.

Thanks.  For the moment, I've reported this as PR testsuite/37703.  Maybe I
get around to fixing it.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01  8:39   ` Arnaud Charlet
@ 2008-10-01 17:07     ` Rainer Orth
  2008-10-01 17:27       ` Arnaud Charlet
  0 siblings, 1 reply; 14+ messages in thread
From: Rainer Orth @ 2008-10-01 17:07 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: Paolo Bonzini, gcc-patches

Arnaud Charlet writes:

> > >  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
> > > -  LIBGNAT_TARGET_PAIRS = \
> > > +  LIBGNAT_TARGET_PAIRS_32 = \
> > >    a-numaux.adb<a-numaux-x86.adb \
> > >    a-numaux.ads<a-numaux-x86.ads \
> > >    a-intnam.ads<a-intnam-solaris.ads \
> > > @@ -828,6 +828,30 @@ ifeq ($(strip $(filter-out %86 solaris2%
> > >    g-soliop.ads<g-soliop-solaris.ads \
> > >    system.ads<system-solaris-x86.ads
> > >  
> > > +  LIBGNAT_TARGET_PAIRS_64 = \
> > > +  a-numaux.adb<a-numaux-x86.adb \
> > > +  a-numaux.ads<a-numaux-x86.ads \
> > 
> > Can you do like http://permalink.gmane.org/gmane.comp.gcc.patches/172865
> > and merge the common bits into a LIBGNAT_TARGET_PAIRS_COMMON variable?
> 
> Also, the change looks incorrect to me, at least the use of g-bytswa-x86.adb
> is likely incorrect on x86_64.

I'm not sure: x86_64-linux doesn't use it (but other x86 specific modules),
and the x86 code in g-bytswa-x86.adb should work just as well on x86_64.  I
can of course also use the generic version, whatever you prefer.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01  8:11 ` Paolo Bonzini
  2008-10-01  8:17   ` Paolo Bonzini
  2008-10-01  8:39   ` Arnaud Charlet
@ 2008-10-01 17:15   ` Rainer Orth
  2008-10-01 17:27     ` Arnaud Charlet
  2008-10-02  8:42     ` Paolo Bonzini
  2 siblings, 2 replies; 14+ messages in thread
From: Rainer Orth @ 2008-10-01 17:15 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: gcc-patches

Paolo Bonzini writes:

> >  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
> > -  LIBGNAT_TARGET_PAIRS = \
> > +  LIBGNAT_TARGET_PAIRS_32 = \
> >    a-numaux.adb<a-numaux-x86.adb \
> >    a-numaux.ads<a-numaux-x86.ads \
> >    a-intnam.ads<a-intnam-solaris.ads \
> > @@ -828,6 +828,30 @@ ifeq ($(strip $(filter-out %86 solaris2%
> >    g-soliop.ads<g-soliop-solaris.ads \
> >    system.ads<system-solaris-x86.ads
> >  
> > +  LIBGNAT_TARGET_PAIRS_64 = \
> > +  a-numaux.adb<a-numaux-x86.adb \
> > +  a-numaux.ads<a-numaux-x86.ads \
> 
> Can you do like http://permalink.gmane.org/gmane.comp.gcc.patches/172865
> and merge the common bits into a LIBGNAT_TARGET_PAIRS_COMMON variable?

I think it's even clearer to use the += idiom also found in
*86-wrs-vxworks.

This patch (yet untested) does this, uses g-bytswa-x86.adb only for x86 and
not x86_64, and simplifies sparc*-sun-solaris* along the same line.
system-solaris-x86_64.ads is unchanged, so I'm not sending it again.

Ok for mainline if it passes?  SPARC testing will take some time since
I'll need to establish a baseline first and run both sparcv9-sun-solaris2
and sparc-sun-solaris2 tests since otherwise the 64-bit sparc portion won't
be exercised due to PR testsuite/37703.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Wed Oct  1 19:03:53 2008  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	PR ada/37681
	* system-solaris-x86_64.ads: New file.
	* gcc-interface/Makefile.in (sparc*-sun-solaris*): Simplify.
	(*86-solaris2*): Support x86_64	multilib.

Index: gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc/ada/gcc-interface/Makefile.in	(revision 140759)
+++ gcc/ada/gcc-interface/Makefile.in	(working copy)
@@ -732,7 +732,7 @@ ifeq ($(strip $(filter-out mips% wrs vx%
 endif
 
 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
-  LIBGNAT_TARGET_PAIRS_32 = \
+  LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-solaris.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
   s-intman.adb<s-intman-solaris.adb \
@@ -744,35 +744,25 @@ ifeq ($(strip $(filter-out sparc% sun so
   s-tasinf.ads<s-tasinf-solaris.ads \
   s-taspri.ads<s-taspri-solaris.ads \
   s-tpopsp.adb<s-tpopsp-solaris.adb \
-  g-soliop.ads<g-soliop-solaris.ads \
+  g-soliop.ads<g-soliop-solaris.ads
+
+  LIBGNAT_TARGET_PAIRS_32 = \
   system.ads<system-solaris-sparc.ads
 
   LIBGNAT_TARGET_PAIRS_64 = \
-  a-intnam.ads<a-intnam-solaris.ads \
-  s-inmaop.adb<s-inmaop-posix.adb \
-  s-intman.adb<s-intman-solaris.adb \
-  s-osinte.adb<s-osinte-solaris.adb \
-  s-osinte.ads<s-osinte-solaris.ads \
-  s-osprim.adb<s-osprim-solaris.adb \
-  s-taprop.adb<s-taprop-solaris.adb \
-  s-tasinf.adb<s-tasinf-solaris.adb \
-  s-tasinf.ads<s-tasinf-solaris.ads \
-  s-taspri.ads<s-taspri-solaris.ads \
-  s-tpopsp.adb<s-tpopsp-solaris.adb \
-  g-soliop.ads<g-soliop-solaris.ads \
   system.ads<system-solaris-sparcv9.ads
 
   ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
     ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
-      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
+      LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_64)
     else
-      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
+      LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_32)
     endif
   else
     ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
-      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
+      LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_32)
     else
-      LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
+      LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_64)
     endif
   endif
 
@@ -824,9 +814,16 @@ ifeq ($(strip $(filter-out %86 solaris2%
   s-tasinf.ads<s-tasinf-solaris.ads \
   s-taspri.ads<s-taspri-solaris.ads \
   s-tpopsp.adb<s-tpopsp-solaris.adb \
-  g-bytswa.adb<g-bytswa-x86.adb \
-  g-soliop.ads<g-soliop-solaris.ads \
-  system.ads<system-solaris-x86.ads
+  g-soliop.ads<g-soliop-solaris.ads
+
+  ifeq ($(strip $(MULTISUBDIR)),/amd64)
+    LIBGNAT_TARGET_PAIRS += \
+    system.ads<system-solaris-x86_64.ads
+  else
+    LIBGNAT_TARGET_PAIRS += \
+    g-bytswa.adb<g-bytswa-x86.adb \
+    system.ads<system-solaris-x86.ads
+  endif
 
   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01 17:07     ` Rainer Orth
@ 2008-10-01 17:27       ` Arnaud Charlet
  0 siblings, 0 replies; 14+ messages in thread
From: Arnaud Charlet @ 2008-10-01 17:27 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Paolo Bonzini, gcc-patches

> I'm not sure: x86_64-linux doesn't use it (but other x86 specific modules),
> and the x86 code in g-bytswa-x86.adb should work just as well on x86_64.  I
> can of course also use the generic version, whatever you prefer.

Well, either you do test this package explicitely and we are sure, or we're
not sure, and we do not use it.

I'd prefer that you do as much testing as possible of course, otherwise
we end up with a half baked port which looks like it works, but does not
really in practice.

Also, stage3 is not the right stage for such new ports, so I'd rather we are
extra careful.

Arno

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01 17:15   ` Rainer Orth
@ 2008-10-01 17:27     ` Arnaud Charlet
  2008-10-10 17:54       ` Rainer Orth
  2008-10-02  8:42     ` Paolo Bonzini
  1 sibling, 1 reply; 14+ messages in thread
From: Arnaud Charlet @ 2008-10-01 17:27 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Paolo Bonzini, gcc-patches

> I think it's even clearer to use the += idiom also found in
> *86-wrs-vxworks.

Right.

> This patch (yet untested) does this, uses g-bytswa-x86.adb only for x86 and
> not x86_64, and simplifies sparc*-sun-solaris* along the same line.
> system-solaris-x86_64.ads is unchanged, so I'm not sending it again.
> 
> Ok for mainline if it passes?  SPARC testing will take some time since
> I'll need to establish a baseline first and run both sparcv9-sun-solaris2
> and sparc-sun-solaris2 tests since otherwise the 64-bit sparc portion won't
> be exercised due to PR testsuite/37703.

OK.

Arno

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01 17:15   ` Rainer Orth
  2008-10-01 17:27     ` Arnaud Charlet
@ 2008-10-02  8:42     ` Paolo Bonzini
  2008-10-02  8:44       ` Arnaud Charlet
  1 sibling, 1 reply; 14+ messages in thread
From: Paolo Bonzini @ 2008-10-02  8:42 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, Arnaud Charlet


> This patch (yet untested) does this, uses g-bytswa-x86.adb only for x86 and
> not x86_64, and simplifies sparc*-sun-solaris* along the same line.
> system-solaris-x86_64.ads is unchanged, so I'm not sending it again.
> 
> Ok for mainline if it passes?

Ok, but as a follow-up please restore using g-bytswa-x86.adb for x86_64
because I checked the code and there's no reason why it should not work.
 Maybe the Swapped8 function is suboptimal, but it works.  Let Arnaud
approve it however.

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-02  8:42     ` Paolo Bonzini
@ 2008-10-02  8:44       ` Arnaud Charlet
  0 siblings, 0 replies; 14+ messages in thread
From: Arnaud Charlet @ 2008-10-02  8:44 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Rainer Orth, gcc-patches

> Ok, but as a follow-up please restore using g-bytswa-x86.adb for x86_64
> because I checked the code and there's no reason why it should not work.
>  Maybe the Swapped8 function is suboptimal, but it works.  Let Arnaud
> approve it however.

Well as I said, if this package is tested and works, then I have no objection
to using it.

Arno

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
       [not found] ` <200809302327.22751.ebotcazou@adacore.com>
  2008-10-01 16:44   ` Rainer Orth
@ 2008-10-10 15:02   ` Rainer Orth
  1 sibling, 0 replies; 14+ messages in thread
From: Rainer Orth @ 2008-10-10 15:02 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches

Eric Botcazou writes:

> > As reported in PR ada/37681, the 64-bit libada fails to build on Solaris
> > 10/x86 due to lack of multilib support for that configuration.  The
> > following patch fixes this.  It allowed the bootstrap to complete and built
> > both 32-bit and 64-bit Ada runtime libs.  No regressions in testing, though
> > ACATS testing isn't multilib aware yet and gnat testing seems to use the
> > wrong system.ads, yielding errors like the following:
> 
> You need to pass --RTS=amd64 in addition to -m64 for the time being.

Both testsuites already handle this by setting ADA_INCLUDE_PATH, though
they are not yet multilib-aware.  I'll report the details in PR
testsuite/37703.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-01 17:27     ` Arnaud Charlet
@ 2008-10-10 17:54       ` Rainer Orth
  2008-10-10 18:14         ` Arnaud Charlet
  0 siblings, 1 reply; 14+ messages in thread
From: Rainer Orth @ 2008-10-10 17:54 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: Paolo Bonzini, gcc-patches

Arnaud Charlet writes:

> > This patch (yet untested) does this, uses g-bytswa-x86.adb only for x86 and
> > not x86_64, and simplifies sparc*-sun-solaris* along the same line.
> > system-solaris-x86_64.ads is unchanged, so I'm not sending it again.
> > 
> > Ok for mainline if it passes?  SPARC testing will take some time since
> > I'll need to establish a baseline first and run both sparcv9-sun-solaris2
> > and sparc-sun-solaris2 tests since otherwise the 64-bit sparc portion won't
> > be exercised due to PR testsuite/37703.
> 
> OK.

sparcv9-sun-solaris2.10 doesn't bootstrap right now (SIGBUS in stage2
compiling ada/ada.ads; I'll report this separately), so I've tested both
multilibs of sparc-sun-solaris2.11 and i386-pc-solaris2.10 separately with
the method described in PR testsuite/37703.

There were no regressions on sparc-sun-solaris2.11 (both multilibs).  It's
hard to say if there are any 32-bit i386-pc-solaris2.10 regressions because
previous results were distorted by PR other/37463.

With this patch, the results look like this:

default multilib (32-bit):

		=== acats tests ===
FAIL:	c34009l
FAIL:	c761006
FAIL:	ce3410a
FAIL:	ce3410e
FAIL:	cxa5a05
FAIL:	cxa5a06
FAIL:	cxg2004
FAIL:	cxg2013

		=== acats Summary ===
# of expected passes		2307
# of unexpected failures	8

		=== gnat tests ===


Running target unix

		=== gnat Summary for unix ===

# of expected passes		573
# of expected failures		6

amd64 multilib (64-bit, new):

		=== acats Summary ===
# of expected passes		2315
# of unexpected failures	0

		=== gnat tests ===

Schedule of variations:
    unix/-m64

		=== gnat Summary ===

# of expected passes		573
# of expected failures		6

I'm currently testing a modified patch with g-bytswa-x86.adb for both
multilibs.  Provided this reveals no new problems, I'll check the patch in.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681)
  2008-10-10 17:54       ` Rainer Orth
@ 2008-10-10 18:14         ` Arnaud Charlet
  0 siblings, 0 replies; 14+ messages in thread
From: Arnaud Charlet @ 2008-10-10 18:14 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Paolo Bonzini, gcc-patches

> I'm currently testing a modified patch with g-bytswa-x86.adb for both
> multilibs.  Provided this reveals no new problems, I'll check the patch in.

I do not think there is any test for this unit right now, so I'd
suggest adding one and make sure it does not fail.

Arno

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-10-10 16:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-30 20:21 PATCH: Support x86_64 multilib on Solaris/x86 (PR ada/37681) Rainer Orth
2008-10-01  8:11 ` Paolo Bonzini
2008-10-01  8:17   ` Paolo Bonzini
2008-10-01  8:39   ` Arnaud Charlet
2008-10-01 17:07     ` Rainer Orth
2008-10-01 17:27       ` Arnaud Charlet
2008-10-01 17:15   ` Rainer Orth
2008-10-01 17:27     ` Arnaud Charlet
2008-10-10 17:54       ` Rainer Orth
2008-10-10 18:14         ` Arnaud Charlet
2008-10-02  8:42     ` Paolo Bonzini
2008-10-02  8:44       ` Arnaud Charlet
     [not found] ` <200809302327.22751.ebotcazou@adacore.com>
2008-10-01 16:44   ` Rainer Orth
2008-10-10 15:02   ` Rainer Orth

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).