pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/gnat-aux Add x86-Solaris and symbolic traceback s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/aad10a3b5fa6
branches:  trunk
changeset: 593436:aad10a3b5fa6
user:      marino <marino%pkgsrc.org@localhost>
date:      Wed Oct 05 18:11:55 2011 +0000

description:
Add x86-Solaris and symbolic traceback support

This changeset addresses several things:
1) Adds support for x86-Solaris (Namely OpenIndiana)
2) Properly implements run-time symbolic traceback support
3) Arranges makefile so patches can be handled in a standard fashion
4) Properly implements MAKE_JOBS which reduces build times by 66%+ on
   the quad-core test machine (30 minutes down to < 10 minutes)

diffstat:

 lang/gnat-aux/Makefile         |   64 +++++---
 lang/gnat-aux/distinfo         |    8 +-
 lang/gnat-aux/patches/patch-aa |  287 +++++++++++++++++++++++++++++++++++++++++
 lang/gnat-aux/patches/patch-ab |  155 ++++++++++++++++++++++
 lang/gnat-aux/patches/patch-ac |  111 +++++++++++++++
 5 files changed, 599 insertions(+), 26 deletions(-)

diffs (truncated from 735 to 300 lines):

diff -r 03658666e334 -r aad10a3b5fa6 lang/gnat-aux/Makefile
--- a/lang/gnat-aux/Makefile    Wed Oct 05 16:23:39 2011 +0000
+++ b/lang/gnat-aux/Makefile    Wed Oct 05 18:11:55 2011 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2011/07/18 09:27:25 drochner Exp $
+# $NetBSD: Makefile,v 1.6 2011/10/05 18:11:55 marino Exp $
 #
 
 DISTNAME=      gnat-aux-${SNAPSHOT}
+PKGREVISION=   1
 CATEGORIES=    lang
 MASTER_SITES=  http://downloads.dragonlace.net/src/ \
                http://dragonlace.mirrors.ada.cx/src/
@@ -32,7 +33,8 @@
 
 ONLY_FOR_PLATFORM=     DragonFly-*-*        \
                        NetBSD-[5-9]*-i386   \
-                       NetBSD-[5-9]*-x86_64
+                       NetBSD-[5-9]*-x86_64 \
+                       SunOS-5.*-i386
 
 BLD_TARGET=            ${MACHINE_ARCH}-aux-${LOWER_OPSYS}${OS_VERSION}
 THREAD_MODEL=          posix
@@ -81,33 +83,44 @@
 .endif
 
 
+.if ${OPSYS} == "SunOS"
+.if ${MACHINE_ARCH} == "i386"
+   OS_LABEL4VERS=      [Solaris]
+   BOOTSTRAP_TRIPLET=  i386-bootstrap-solaris5.11/4.6.1
+.endif
+SOL_OSV=               `expr substr ${OS_VERSION} 3 2`
+BLD_TARGET=            ${MACHINE_ARCH}-aux-${LOWER_OPSYS}2.${SOL_OSV}
+BOOTSTRAP_COMPILER=    gnat-bootstrap.${MACHINE_ARCH}.solaris.tar.bz2
+.endif
+
+
 
 # Let's build this without bash
 CONFIG_SHELL=          ${TOOLS_PATH.sh}
 
 
 # define some important directories and files
-WRKSRC=                        ${WRKDIR}/build
-GCC_WRKSRC=            ${WRKDIR}/gcc-${GCC_BRANCH}-${SNAPSHOT}
+BUILDDIR=              ${WRKDIR}/build
+WRKSRC=                        ${WRKDIR}/gcc-${GCC_BRANCH}-${SNAPSHOT}
 PKG_PREFIX=            ${PREFIX}
-CONFIGURE_SCRIPT=      ${GCC_WRKSRC}/configure
+CFG_SCRIPT=            ${WRKSRC}/configure
 BOOTSTRAP_PREFIX=      ${WRKDIR}/bootstrap
 MAN7=                  fsf-funding.7 gfdl.7 gpl.7
 SMAN1=                 share/man/man1
 SMAN7=                 share/man/man7
 LPATH=                 lib/gcc/${BLD_TARGET}/${GCC_BRANCH}.${GCC_POINT}
 LEPATH=                        libexec/gcc/${BLD_TARGET}/${GCC_BRANCH}.${GCC_POINT}
-REVFILE=               ${GCC_WRKSRC}/gcc/REVISION
+REVFILE=               ${WRKSRC}/gcc/REVISION
 BASELIB=               ${LOCALBASE}/lib
 
 
 
 # testing if gnatgcc, gnatlink, gnatbind and gnatmake are in standard location
 # exists function will NOT expand any variable, so it has to be hard-coded
-.if exists(/usr/pkg/bin/gnatgcc)
-.if exists(/usr/pkg/bin/gnatbind)
-.if exists(/usr/pkg/bin/gnatlink)
-.if exists(/usr/pkg/bin/gnatmake)
+.if exists(/usr/pkg/bin/gnatgcc)  || exists(/opt/ipp/pkg/bin/gnatgcc)
+.if exists(/usr/pkg/bin/gnatbind) || exists(/opt/ipp/pkg/bin/gnatbind)
+.if exists(/usr/pkg/bin/gnatlink) || exists(/opt/ipp/pkg/bin/gnatlink)
+.if exists(/usr/pkg/bin/gnatmake) || exists(/opt/ipp/pkg/bin/gnatmake)
 FULL_GNATGCC=${PREFIX}/bin/gnatgcc
 .endif #gnatmake
 .endif #gnatlink
@@ -129,7 +142,8 @@
 #  gnat-bootstrap.i386.dragonfly.tar.bz2 \
 #  gnat-bootstrap.x86_64.dragonfly.tar.bz2 \
 #  gnat-bootstrap.i386.netbsd.tar.bz2 \
-#  gnat-bootstrap.x86_64.netbsd.tar.bz2
+#  gnat-bootstrap.x86_64.netbsd.tar.bz2 \
+#  gnat-bootstrap.i386.solaris.tar.bz2
 
 
 # establish ada-aware compiler for use
@@ -137,7 +151,7 @@
 MY_CONFIGURE_ENV+=     PATH=${FULL_PATH}
 MY_CONFIGURE_ENV+=     CONFIG_SHELL=${CONFIG_SHELL}
 MY_MAKE_ENV=           PATH=${FULL_PATH}
-MY_MAKE_ENV+=          LD_LIBRARY_PATH=${WRKSRC}/gcc
+MY_MAKE_ENV+=          LD_LIBRARY_PATH=${BUILDDIR}/gcc
 
 
 # The standard configuration options
@@ -241,17 +255,17 @@
        ${SETENV} CC=${FULL_GNATGCC}
 
        #reset timestamps
-       cd ${GCC_WRKSRC}; contrib/gcc_update --touch
-       ${RM} -f ${GCC_WRKSRC}/gcc/*/*.info*
-       ${TOUCH} ${GCC_WRKSRC}/gcc/cstamp-h.in
+       cd ${WRKSRC}; contrib/gcc_update --touch
+       ${RM} -f ${WRKSRC}/gcc/*/*.info*
+       ${TOUCH} ${WRKSRC}/gcc/cstamp-h.in
 
-       ${MKDIR} ${WRKSRC}
-       cd ${WRKSRC} && ${SETENV} ${MY_CONFIGURE_ENV} ${CONFIG_SHELL} \
-       ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
+       ${MKDIR} ${BUILDDIR}
+       cd ${BUILDDIR} && ${SETENV} ${MY_CONFIGURE_ENV} \
+       ${CFG_SCRIPT} ${CONFIGURE_ARGS}
 
 
 do-build:
-       cd ${WRKSRC} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} all ${MAKE_ARGS}
+       cd ${BUILDDIR} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -j${MAKE_JOBS:U1:Q} all
 
 
 do-test: build
@@ -259,24 +273,24 @@
 .if (${OPSYS} == "NetBSD") && (${MACHINE_ARCH} == "x86_64")
        #NetBSD has an exremely small default stacksize of 2MB, which is insufficient
        #for the gnat.dg testsuite (entry_queues test on AMD64 specifically)
-       cd ${WRKSRC} && \
+       cd ${BUILDDIR} && \
        ${ULIMIT_CMD_stacksize} && \
        ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-ada
 .else
-       cd ${WRKSRC} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-ada
+       cd ${BUILDDIR} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-ada
 .endif
 .endif
 .if !empty(PKG_OPTIONS:Mtestcxx)
-       cd ${WRKSRC} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-c++
-       cd ${WRKSRC} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-target-libstdc++-v3
+       cd ${BUILDDIR} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-c++
+       cd ${BUILDDIR} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-target-libstdc++-v3
 .endif
 .if !empty(PKG_OPTIONS:Mtestgcc)
-       cd ${WRKSRC} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-c
+       cd ${BUILDDIR} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} -sk check-c
 .endif
 
 
 do-install:
-       cd ${WRKSRC} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} install-strip \
+       cd ${BUILDDIR} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} install-strip \
        DESTDIR=${DESTDIR}
 
 
diff -r 03658666e334 -r aad10a3b5fa6 lang/gnat-aux/distinfo
--- a/lang/gnat-aux/distinfo    Wed Oct 05 16:23:39 2011 +0000
+++ b/lang/gnat-aux/distinfo    Wed Oct 05 18:11:55 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2011/07/18 09:27:25 drochner Exp $
+$NetBSD: distinfo,v 1.5 2011/10/05 18:11:55 marino Exp $
 
 SHA1 (gnat-aux-20110627.tar.bz2) = 598d2c21c3bbd1e2cada2ca98331107af3deb608
 RMD160 (gnat-aux-20110627.tar.bz2) = 84b05832457568fef9355279214caeacca9c74ba
@@ -15,3 +15,9 @@
 SHA1 (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 84f0e9179998daa643046a5d139321c4130ea84d
 RMD160 (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 0b2943349536c323a62b56dc05ff1fedd6d7e17a
 Size (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 30572187 bytes
+SHA1 (gnat-bootstrap.i386.solaris.tar.bz2) = 4962657bfc894a20ad3102c1f6fe8e566b47cb51
+RMD160 (gnat-bootstrap.i386.solaris.tar.bz2) = ae72e76d0aba94451d99b9a70a3c049c9258cc82
+Size (gnat-bootstrap.i386.solaris.tar.bz2) = 43247034 bytes
+SHA1 (patch-aa) = 8a6199bb91fa1051db7af154e6995c116da71e63
+SHA1 (patch-ab) = 76cff68f5f697ed5aacd41d06bbb4d9a805e9d91
+SHA1 (patch-ac) = f8a73fc95b9119ae75b64a5578b94be6dbccb837
diff -r 03658666e334 -r aad10a3b5fa6 lang/gnat-aux/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gnat-aux/patches/patch-aa    Wed Oct 05 18:11:55 2011 +0000
@@ -0,0 +1,287 @@
+$NetBSD: patch-aa,v 1.1 2011/10/05 18:11:55 marino Exp $
+
+--- gcc/ada/adaint.c.orig      2011-07-15 08:08:10.000000000 +0200
++++ gcc/ada/adaint.c   2011-10-03 00:43:37.392616438 +0200
+@@ -1201,6 +1201,47 @@
+     free (pname);
+   }
+ 
++#elif defined (__ANDROID__)
++
++  /*
++   * ext2 /ext3/ext4/fat16/fat32 have no path limits
++   * /data/local/tmp normally requires rooted devices, if it even exists
++   * /sdcard is the standard location for external storage.  Nativeactivity
++   * manifest needs to authorize its use, otherwise it might not have the
++   * proper permissions.
++   */
++
++  int testfd;
++  char *datadir = getenv ("ANDROID_DATA");
++
++  if (datadir == NULL)
++    strcpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX");
++  else
++    sprintf (tmp_filename, "%s/local/tmp/gnat-XXXXXX", datadir);
++
++  testfd = mkstemp (tmp_filename);
++  if (testfd != -1)
++    {
++      close (testfd);
++      return;
++    }
++
++  char *sdcard = getenv ("EXTERNAL_STORAGE");
++
++  if (sdcard == NULL)
++    strcpy (tmp_filename, "/sdcard/gnat-XXXXXX");
++  else
++    sprintf (tmp_filename, "%s/gnat-XXXXXX", sdcard);
++
++  testfd = mkstemp (tmp_filename);
++  if (testfd != -1)
++    {
++      close (testfd);
++      return;
++    }
++
++  tmpnam (tmp_filename);
++
+ #elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
+   || defined (__DragonFly__) \
+   || defined (__OpenBSD__) || defined(__GLIBC__)
+@@ -3433,26 +3474,214 @@
+ }
+ #endif
+ 
+-#if defined (IS_CROSS)  \
+-  || (! ((defined (sparc) || defined (i386)) && defined (sun) \
+-      && defined (__SVR4)) \
+-      && ! (defined (linux) && (defined (i386) || defined (__x86_64__))) \
+-      && ! (defined (linux) && defined (__ia64__)) \
+-      && ! (defined (linux) && defined (powerpc)) \
+-      && ! defined (__FreeBSD__) \
+-      && ! defined (__DragonFly__) \
+-      && ! defined (__Lynx__) \
+-      && ! defined (__hpux__) \
+-      && ! defined (__APPLE__) \
+-      && ! defined (_AIX) \
+-      && ! (defined (__alpha__)  && defined (__osf__)) \
+-      && ! defined (VMS) \
+-      && ! defined (__MINGW32__) \
+-      && ! (defined (__mips) && defined (__sgi)))
+-
+-/* Dummy function to satisfy g-trasym.o. See the preprocessor conditional
+-   just above for a list of native platforms that provide a non-dummy
+-   version of this procedure in libaddr2line.a.  */
++/* run-time symbolic traceback support */
++#if defined (__DragonFly__) \
++ || defined (__FreeBSD__) \
++ || defined (__OpenBSD__) \
++ || defined (__NetBSD__) \
++ || (defined (__sun__) && defined (__i386__) && defined (__SVR4))
++
++/* The above platforms use the external program /usr/bin/addr2line */
++#define EXTERNAL_SYMTRACE
++
++#elif defined (VMS) \
++   || defined (_AIX) \
++   || defined (__Lynx__) \
++   || defined (__hpux__)  \
++   || defined (__APPLE__) \
++   || defined (__MINGW32__) \
++   || (defined (__mips)    && defined (__sgi)) \
++   || (defined (__alpha__) && defined (__osf__)) \
++   || (defined (linux)     && defined (i386)) \
++   || (defined (linux)     && defined (powerpc)) \
++   || (defined (linux)     && defined (__ia64__)) \
++   || (defined (linux)     && defined (__x86_64__)) \
++   || (defined (__SVR4)    && defined (__sun__) && defined (sparc))
++
++/* The above platforms use the system library libaddr2line.a */
++#define NATIVE_SYMTRACE
++#endif
++
++#if defined (EXTERNAL_SYMTRACE) && !defined (IS_CROSS)
++
++/*
++  Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer%gmx.net@localhost>
++  Ada for Linux Team (ALT)
++  Heavily modified by John Marino <http://www.dragonlace.net>
++
++  Permission is hereby granted, free of charge, to any person obtaining a
++  copy of this software and associated documentation files (the
++  "Software"), to deal in the Software without restriction, including
++  without limitation the rights to use, copy, modify, merge, publish,
++  distribute, distribute with modifications, sublicense, and/or sell
++  copies of the Software, and to permit persons to whom the Software is
++  furnished to do so, subject to the following conditions:
++
++  The above copyright notice and this permission notice shall be included
++  in all copies or substantial portions of the Software.
++
++  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++  IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,



Home | Main Index | Thread Index | Old Index