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]

[ADA PATCH] Target macro definitions for s390*-linux*


Hello,

this adds target-pairs statements for s390-*-linux* and s390x-*-linux*
to the Makefile to enable full Ada runtime library support on s390(x):
- task support
- shared library support
- DWARF-2 zero-cost exception handling

Note that I'm actually using only files already present (basically,
s390 uses the same files as i386 and s390x the same as x86_64).

Together with the bugfixes posted here:
http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01832.html
http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01833.html
http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01834.html

this achieves near-perfect ACATS test suite results:
http://gcc.gnu.org/ml/gcc-testresults/2004-04/msg01350.html
http://gcc.gnu.org/ml/gcc-testresults/2004-04/msg01351.html

The only failure is c380004 on s390x, which appears to be a Ada common
code 64-bit problem (and also fails on x86_64) -- the code tries to 
allocate a data structure of size > 2GB (which fails due to memory
limits) because of this code:

  /* If the size is still self-referential, reference the initializing
     expression, if it is present.  If not, this must have been a
     call to allocate a library-level object, in which case we use
     the maximum size.  */
  if (CONTAINS_PLACEHOLDER_P (size))
    {
      if (init == 0)
        size = max_size (size, 1);
      else
        size = substitute_placeholder_in_expr (size, init);
    }

in build_allocator (utils2.c); the 'maximum size' depends on a 
subexpression of 32-bit integer type, which is set to 2 GB
as theoretical maximum (the computation subsequently overflows
on 32-bit, but not on 64-bit where pointers are 64-bit).

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.
OK?

Bye,
Ulrich

ChangeLog:

	* Makefile.in: Add target macro definitions for s390*-linux*.

Index: gcc/ada/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.80
diff -c -p -r1.80 Makefile.in
*** gcc/ada/Makefile.in	23 Apr 2004 21:06:21 -0000	1.80
--- gcc/ada/Makefile.in	26 Apr 2004 21:49:40 -0000
*************** ifeq ($(strip $(filter-out %86 freebsd%,
*** 888,893 ****
--- 888,933 ----
    LIBRARY_VERSION := $(LIB_VERSION)
  endif
  
+ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
+   ifeq ($(strip $(filter-out s390x,$(arch))),)
+     LIBGNAT_TARGET_PAIRS = \
+     a-intnam.ads<4lintnam.ads \
+     s-inmaop.adb<7sinmaop.adb \
+     s-intman.adb<7sintman.adb \
+     s-osinte.adb<5iosinte.adb \
+     s-osinte.ads<5iosinte.ads \
+     s-osprim.adb<7sosprim.adb \
+     s-taprop.adb<5itaprop.adb \
+     s-taspri.ads<5itaspri.ads \
+     s-tpopsp.adb<5atpopsp.adb \
+     s-parame.adb<5lparame.adb \
+     system.ads<5nsystem.ads
+   else
+     LIBGNAT_TARGET_PAIRS = \
+     a-intnam.ads<4lintnam.ads \
+     s-inmaop.adb<7sinmaop.adb \
+     s-intman.adb<7sintman.adb \
+     s-osinte.adb<5iosinte.adb \
+     s-osinte.ads<5iosinte.ads \
+     s-osprim.adb<7sosprim.adb \
+     s-taprop.adb<5itaprop.adb \
+     s-taspri.ads<5itaspri.ads \
+     s-tpopsp.adb<5atpopsp.adb \
+     s-parame.adb<5lparame.adb \
+     system.ads<5lsystem.ads
+   endif
+ 
+   TOOLS_TARGET_PAIRS =  \
+     mlib-tgt.adb<5lml-tgt.adb
+ 
+   SYMLIB = $(ADDR2LINE_SYMLIB)
+   THREADSLIB = -lpthread
+   GNATLIB_SHARED = gnatlib-shared-dual
+   GMEM_LIB = gmemlib
+   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
+   LIBRARY_VERSION := $(LIB_VERSION)
+ endif
+ 
  ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
    ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
      LIBGNAT_TARGET_PAIRS = \
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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