Ticket #5281: 5281-add-AIX-and-HP-UX-support.patch

File 5281-add-AIX-and-HP-UX-support.patch, 13.4 KB (added by drkirkby, 12 years ago)

Patch to add AIX and HP-UX support.

  • SPKG.txt

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1285412105 -3600
    # Node ID f5af6b93e474084b610888cd38b4a02b053ce224
    # Parent  7df54cba05add20f3f258c936b389ba9b172728a
    #5281 Add support for both AIX and HP-UX. #9997 shows that AIX fails, and I know HP-UX would have failed too
    
    diff -r 7df54cba05ad -r f5af6b93e474 SPKG.txt
    a b  
    4545
    4646== Changelog ==
    4747
    48 === tachyon-0.98.9 (Marshall Hampton, September 3rd, 2010)
    49  * #5281: upgrade to 0.98.9 form 0.98.beta.  Also cleaned up SPKG.txt and spkg-install.  Deleted scenes folder and msvc folders to save space.
     48=== tachyon-0.98.9 (Marshall Hampton, David Kirkby, September 25th, 2010)
     49 * #5281: upgrade to 0.98.9 form 0.98.beta. 
     50 * Also cleaned up SPKG.txt and spkg-install.
     51 * Deleted scenes folder and msvc folders to save space.
     52 * #9997 Add targets for AIX and HP-UX for a generic compiler
     53   such as gcc into patches/Make-arch. These 4 targets are:
     54   aix-generic, aix-generic-thr, hpux-generic and hpux-generic-thr
     55 * Call the targets aix-generic-thr and hpux-generic-thr from
     56   spkg-install on AIX and HP-UX repectively.
    5057
    5158=== tachyon-0.98beta.p11 (David Kirkby, May 23rd 2010) ===
    5259 * #9024: tachyon is buiding 32-bit on OpenSolaris x64 even when SAGE64 is set to "yes"
  • patches/Make-arch

    diff -r 7df54cba05ad -r f5af6b93e474 patches/Make-arch
    a b  
    2323        @echo "--------------------------------------------------------------"
    2424        @echo "              Parallel Versions        "
    2525        @echo ""
    26         @echo "             aix-thr - IBM AIX 5.x      POSIX Threads         "
     26        @echo "     aix-generic-thr - IBM AIX POSIX Threads. Generic compiler"
     27        @echo "             aix-thr - IBM AIX 5.x POSIX Threads. IBM compiler "
    2728        @echo "          aix-64-thr - IBM AIX 5.x      POSIX Threads, 64-bit "
    2829        @echo "             aix-mpi - IBM AIX 5.x (SP) MPI                   "
    2930        @echo "        asci-red-mpi - Intel ASCI Red   MPI                   "
     
    3233        @echo "        cray-t3e-mpi - Cray T3E         MPI                   "
    3334        @echo "        cray-xt3-mpi - Cray XT3         MPI                   "
    3435        @echo "  compaq-alphasc-mpi - Lemieux at PSC   MPI                   "
     36        @echo "    hpux-generic-thr - HP/UX POSIX Threads. Generic compiler  "
    3537        @echo "            hpux-thr - HP/UX 11.x       POSIX Threads         "
    3638        @echo "       hpux-ia64-thr - HP-UX IA-64, HP C, POSIX Threads       "
    3739        @echo "           irix6-thr - SGI IRIX 6.5.x   POSIX Threads         "
     
    6466        @echo "--------------------------------------------------------------"
    6567        @echo "              Sequential Versions                             "
    6668        @echo ""
    67         @echo "              aix - IBM AIX 5.x                             "
     69        @echo "              aix - IBM 5.x using IBM's compiler            "
     70        @echo "      aix-generic - IBM AIX Generic compiler (gcc etc)      "
    6871        @echo "              bsd - OpenBSD/FreeBSD/NetBSD                  "
    69         @echo "             hpux - HP/UX 11.x                              "
     72        @echo "             hpux - HP/UX 11.x  HP's compiler               "
     73        @echo "     hpux-generic - HP/UX 11.x  Generic compiler (gcc etc)  "
    7074        @echo "            irix6 - SGI Irix 6.x                            "
    7175        @echo "            linux - Linux                                   "
    7276        @echo "         linux-64 - Linux, AMD64/EM64T, GCC 3.x, 64-bit     "
     
    787791## available yet, since access to a thread capable test machine is needed
    788792## for implementation.  These configurations require xlc.
    789793##
     794## The AIX and HP-UX target for generic compilers (e.g. gcc) have not been
     795## properly tested.
    790796
    791797
    792798aix:
     
    799805        "STRIP = strip" \
    800806        "LIBS = -L. -ltachyon $(MISCLIB) -lm"
    801807
     808# The aix-generic target has not been tested.
     809# It should work with gcc and perhaps other
     810# compilers, as the compiler name is not
     811# hard-coded. As long as CFLAGS are set properly
     812# it should work both 32-bit and 64-bit.
     813aix-generic:
     814        $(MAKE) all \
     815        "ARCH = aix-generic" \
     816        "CC = $(CC)" \
     817        "CFLAGS = $(CFLAGS) -DAIX $(MISCFLAGS)" \
     818        "AR = ar" \
     819        "ARFLAGS = r" \
     820        "STRIP = strip" \
     821        "LIBS = -L. -ltachyon $(MISCLIB) -lm"
     822
    802823aix-mpi:
    803824        $(MAKE) all \
    804825        "ARCH = aix-mpi" \
     
    819840        "STRIP = strip" \
    820841        "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
    821842
     843# The aix-generic-thr target has not been tested.
     844# It should work with gcc and perhaps other
     845# compilers, as the compiler name is not
     846# hard-coded. As long as CFLAGS are set properly
     847# it should work both 32-bit and 64-bit.
     848aix-generic-thr:
     849        $(MAKE) all \
     850        "ARCH = aix-generic-thr" \
     851        "CC = $(CC)" \
     852        "CFLAGS = $(CFLAGS) -DAIX $(MISCFLAGS) -DTHR -D_REENTRANT" \
     853        "AR = ar" \
     854        "ARFLAGS = r" \
     855        "STRIP = strip" \
     856        "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
     857
    822858aix-64-thr:
    823859        $(MAKE) all \
    824860        "ARCH = aix-64-thr" \
     
    847883        "STRIP = strip" \
    848884        "LIBS = -L. -ltachyon $(MISCLIB) -lm"
    849885
     886# The hpux-generic target has not been tested.
     887# It should work with gcc and perhaps other
     888# compilers, as the compiler name is not
     889# hard-coded. As long as CFLAGS are set properly
     890# it should work both 32-bit and 64-bit.
     891hpux-generic:
     892        $(MAKE) all \
     893        "ARCH = hpux-generic" \
     894        "CC = $(CC)" \
     895        "CFLAGS = $(CFLAGS) -DHPUX $(MISCFLAGS)" \
     896        "AR = ar" \
     897        "ARFLAGS = r" \
     898        "STRIP = strip" \
     899        "LIBS = -L. -ltachyon $(MISCLIB) -lm"
     900
     901# The hpux-generic-thr target has not been tested.
     902# It should work with gcc and perhaps other
     903# compilers, as the compiler name is not
     904# hard-coded. As long as CFLAGS are set properly
     905# it should work both 32-bit and 64-bit.
     906hpux-generic-thr:
     907        $(MAKE) all \
     908        "ARCH = hpux-generic-thr" \
     909        "CC = $(CC)" \
     910        "CFLAGS = $(CFLAGS) -DHPUX $(MISCFLAGS) -DTHR -D_REENTRANT" \
     911        "AR = ar" \
     912        "ARFLAGS = r" \
     913        "STRIP = strip" \
     914        "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
     915
    850916hpux-thr:
    851917        $(MAKE) all \
    852918        "ARCH = hpux-thr" \
  • patches/Make-arch.patch

    diff -r 7df54cba05ad -r f5af6b93e474 patches/Make-arch.patch
    a b  
    1 55d54
    2 <       @echo "solaris-pthreads-gcc-64-bit - 64-bit (should work on SPARC or x64)"
    3 484,493d482
    4 < solaris-pthreads-gcc-64-bit:
    5 <       $(MAKE) all \
    6 <       "ARCH = solaris-pthreads-gcc" \
    7 <       "CC = gcc" \
    8 <       "CFLAGS = -Wall -O4 -m64 -fomit-frame-pointer -ffast-math -D_REENTRANT -DSunOS $(MISCFLAGS) -DTHR -DUSEPOSIXTHREADS" \
    9 <       "AR = ar" \
    10 <       "ARFLAGS = r" \
    11 <       "STRIP = strip" \
    12 <       "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
    13 <
    14 900,910d888
    15 < macosx-64:
    16 <       $(MAKE) all \
    17 <       "ARCH = macosx" \
    18 <       "CC = cc" \
    19 <       "CFLAGS = -Os -m64 -ffast-math -DBsd $(MISCFLAGS)" \
    20 <       "AR = ar" \
    21 <       "ARFLAGS = r" \
    22 <       "STRIP = strip" \
    23 <       "RANLIB = ranlib" \
    24 <       "LIBS = -L. -ltachyon $(MISCLIB)"
    25 <
     1--- src/unix/Make-arch  2010-01-18 19:13:41.000000000 +0000
     2+++ patches/Make-arch   2010-09-25 10:58:43.137777435 +0100
     3@@ -23,7 +23,8 @@
     4        @echo "--------------------------------------------------------------"
     5        @echo "              Parallel Versions        "
     6        @echo ""
     7-       @echo "             aix-thr - IBM AIX 5.x      POSIX Threads         "
     8+       @echo "     aix-generic-thr - IBM AIX POSIX Threads. Generic compiler"
     9+       @echo "             aix-thr - IBM AIX 5.x POSIX Threads. IBM compiler "
     10        @echo "          aix-64-thr - IBM AIX 5.x      POSIX Threads, 64-bit "
     11        @echo "             aix-mpi - IBM AIX 5.x (SP) MPI                   "
     12        @echo "        asci-red-mpi - Intel ASCI Red   MPI                   "
     13@@ -32,6 +33,7 @@
     14        @echo "        cray-t3e-mpi - Cray T3E         MPI                   "
     15        @echo "        cray-xt3-mpi - Cray XT3         MPI                   "
     16        @echo "  compaq-alphasc-mpi - Lemieux at PSC   MPI                   "
     17+       @echo "    hpux-generic-thr - HP/UX POSIX Threads. Generic compiler  "
     18        @echo "            hpux-thr - HP/UX 11.x       POSIX Threads         "
     19        @echo "       hpux-ia64-thr - HP-UX IA-64, HP C, POSIX Threads       "
     20        @echo "           irix6-thr - SGI IRIX 6.5.x   POSIX Threads         "
     21@@ -52,6 +54,7 @@
     22        @echo "         solaris-mpi - Sun Solaris 9/10 MPI (MPICH)           "
     23        @echo "         solaris-lam - Sun Solaris 9/10 MPI (OSC LAM)         "
     24        @echo "         solaris-thr - Sun Solaris 9/10 UI/Sun Threads        "
     25+       @echo "solaris-pthreads-gcc-64-bit - 64-bit (should work on SPARC or x64)"
     26        @echo "   solaris-ultra-thr - Sun Solaris 9/10 UI/Sun Threads, US-1/2"
     27        @echo "  solaris-ultra3-thr - Sun Solaris 9/10 UI/Sun Threads, US-III"
     28        @echo "      solaris-64-thr - Sun Solaris 9/10 UI/Sun Threads, 64-bit"
     29@@ -63,9 +66,11 @@
     30        @echo "--------------------------------------------------------------"
     31        @echo "              Sequential Versions                             "
     32        @echo ""
     33-       @echo "              aix - IBM AIX 5.x                             "
     34+       @echo "              aix - IBM 5.x using IBM's compiler            "
     35+       @echo "      aix-generic - IBM AIX Generic compiler (gcc etc)      "
     36        @echo "              bsd - OpenBSD/FreeBSD/NetBSD                  "
     37-       @echo "             hpux - HP/UX 11.x                              "
     38+       @echo "             hpux - HP/UX 11.x  HP's compiler               "
     39+       @echo "     hpux-generic - HP/UX 11.x  Generic compiler (gcc etc)  "
     40        @echo "            irix6 - SGI Irix 6.x                            "
     41        @echo "            linux - Linux                                   "
     42        @echo "         linux-64 - Linux, AMD64/EM64T, GCC 3.x, 64-bit     "
     43@@ -480,6 +485,16 @@
     44        "STRIP = strip" \
     45        "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
     46 
     47+solaris-pthreads-gcc-64-bit:
     48+       $(MAKE) all \
     49+       "ARCH = solaris-pthreads-gcc" \
     50+       "CC = gcc" \
     51+       "CFLAGS = -Wall -O4 -m64 -fomit-frame-pointer -ffast-math -D_REENTRANT -DSunOS $(MISCFLAGS) -DTHR -DUSEPOSIXTHREADS" \
     52+       "AR = ar" \
     53+       "ARFLAGS = r" \
     54+       "STRIP = strip" \
     55+       "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
     56+
     57 solaris-thr-x11:
     58        $(MAKE) all \
     59        "ARCH = solaris-thr-x11" \
     60@@ -776,6 +791,8 @@
     61 ## available yet, since access to a thread capable test machine is needed
     62 ## for implementation.  These configurations require xlc.
     63 ##
     64+## The AIX and HP-UX target for generic compilers (e.g. gcc) have not been
     65+## properly tested.
     66 
     67 
     68 aix:
     69@@ -788,6 +805,21 @@
     70        "STRIP = strip" \
     71        "LIBS = -L. -ltachyon $(MISCLIB) -lm"
     72 
     73+# The aix-generic target has not been tested.
     74+# It should work with gcc and perhaps other
     75+# compilers, as the compiler name is not
     76+# hard-coded. As long as CFLAGS are set properly
     77+# it should work both 32-bit and 64-bit.
     78+aix-generic:
     79+       $(MAKE) all \
     80+       "ARCH = aix-generic" \
     81+       "CC = $(CC)" \
     82+       "CFLAGS = $(CFLAGS) -DAIX $(MISCFLAGS)" \
     83+       "AR = ar" \
     84+       "ARFLAGS = r" \
     85+       "STRIP = strip" \
     86+       "LIBS = -L. -ltachyon $(MISCLIB) -lm"
     87+
     88 aix-mpi:
     89        $(MAKE) all \
     90        "ARCH = aix-mpi" \
     91@@ -808,6 +840,21 @@
     92        "STRIP = strip" \
     93        "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
     94 
     95+# The aix-generic-thr target has not been tested.
     96+# It should work with gcc and perhaps other
     97+# compilers, as the compiler name is not
     98+# hard-coded. As long as CFLAGS are set properly
     99+# it should work both 32-bit and 64-bit.
     100+aix-generic-thr:
     101+       $(MAKE) all \
     102+       "ARCH = aix-generic-thr" \
     103+       "CC = $(CC)" \
     104+       "CFLAGS = $(CFLAGS) -DAIX $(MISCFLAGS) -DTHR -D_REENTRANT" \
     105+       "AR = ar" \
     106+       "ARFLAGS = r" \
     107+       "STRIP = strip" \
     108+       "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
     109+
     110 aix-64-thr:
     111        $(MAKE) all \
     112        "ARCH = aix-64-thr" \
     113@@ -836,6 +883,36 @@
     114        "STRIP = strip" \
     115        "LIBS = -L. -ltachyon $(MISCLIB) -lm"
     116 
     117+# The hpux-generic target has not been tested.
     118+# It should work with gcc and perhaps other
     119+# compilers, as the compiler name is not
     120+# hard-coded. As long as CFLAGS are set properly
     121+# it should work both 32-bit and 64-bit.
     122+hpux-generic:
     123+       $(MAKE) all \
     124+       "ARCH = hpux-generic" \
     125+       "CC = $(CC)" \
     126+       "CFLAGS = $(CFLAGS) -DHPUX $(MISCFLAGS)" \
     127+       "AR = ar" \
     128+       "ARFLAGS = r" \
     129+       "STRIP = strip" \
     130+       "LIBS = -L. -ltachyon $(MISCLIB) -lm"
     131+
     132+# The hpux-generic-thr target has not been tested.
     133+# It should work with gcc and perhaps other
     134+# compilers, as the compiler name is not
     135+# hard-coded. As long as CFLAGS are set properly
     136+# it should work both 32-bit and 64-bit.
     137+hpux-generic-thr:
     138+       $(MAKE) all \
     139+       "ARCH = hpux-generic-thr" \
     140+       "CC = $(CC)" \
     141+       "CFLAGS = $(CFLAGS) -DHPUX $(MISCFLAGS) -DTHR -D_REENTRANT" \
     142+       "AR = ar" \
     143+       "ARFLAGS = r" \
     144+       "STRIP = strip" \
     145+       "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
     146+
     147 hpux-thr:
     148        $(MAKE) all \
     149        "ARCH = hpux-thr" \
     150@@ -886,6 +963,17 @@
     151        "RANLIB = ranlib" \
     152        "LIBS = -L. -ltachyon $(MISCLIB)"
     153 
     154+macosx-64:
     155+       $(MAKE) all \
     156+       "ARCH = macosx" \
     157+       "CC = cc" \
     158+       "CFLAGS = -Os -m64 -ffast-math -DBsd $(MISCFLAGS)" \
     159+       "AR = ar" \
     160+       "ARFLAGS = r" \
     161+       "STRIP = strip" \
     162+       "RANLIB = ranlib" \
     163+       "LIBS = -L. -ltachyon $(MISCLIB)"
     164+
     165 macosx-thr:
     166        $(MAKE) all \
     167        "ARCH = macosx-thr" \
  • spkg-install

    diff -r 7df54cba05ad -r f5af6b93e474 spkg-install
    a b  
    8585    finished
    8686fi
    8787
     88if [ "x$UNAME" = xAIX ]; then
     89    CFLAGS="$CFLAGS -g -O2"
     90    export CFLAGS
     91    make aix-generic-thr
     92    finished
     93fi
     94
     95if [ "x$UNAME" = xHP-UX ]; then
     96    CFLAGS="$CFLAGS -g -O2"
     97    export CFLAGS
     98    make hpux-generic-thr
     99    finished
     100fi
     101
     102
    88103echo "Tachyon build for $UNAME not implemented (for SAGE) - please complain on sage-devel"
    89104exit 1