changeset 6:4b740bf0d945

update
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Mon, 04 Aug 2014 17:40:23 -0400
parents adc0911de0f7
children 5e1cc2b09530
files binutils.diff build.sh hercules.patch
diffstat 3 files changed, 80 insertions(+), 126 deletions(-) [+]
line wrap: on
line diff
--- a/binutils.diff	Mon May 14 15:16:35 2012 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-diff -ru binutils-2.21.1.orig//gas/config/tc-s390.c binutils-2.21.1/gas/config/tc-s390.c
---- binutils-2.21.1.orig//gas/config/tc-s390.c	Sat Oct 29 16:02:41 2011
-+++ binutils-2.21.1/gas/config/tc-s390.c	Sat Oct 29 16:14:48 2011
-@@ -527,7 +527,6 @@
- {
-   register const struct s390_opcode *op;
-   const struct s390_opcode *op_end;
--  bfd_boolean dup_insn = FALSE;
-   const char *retval;
- 
-   /* Give a warning if the combination -m64-bit and -Aesa is used.  */
-@@ -551,7 +550,6 @@
- 	{
- 	  as_bad (_("Internal assembler error for instruction format %s"),
- 		  op->name);
--	  dup_insn = TRUE;
- 	}
-     }
- 
--- a/build.sh	Mon May 14 15:16:35 2012 -0400
+++ b/build.sh	Mon Aug 04 17:40:23 2014 -0400
@@ -1,10 +1,10 @@
 #!/bin/sh
 
-GCC_DIR="gcc-4.6.2"
-BINUTILS_DIR="binutils-2.21.1"
-GMP_DIR="gmp-5.0.2"
-MPFR_DIR="mpfr-3.1.0"
-MPC_DIR="mpc-0.9"
+BINUTILS_DIR="binutils-2.24"
+GMP_DIR="gmp-5.1.3"
+MPFR_DIR="mpfr-3.1.2"
+MPC_DIR="mpc-1.0.1"
+GCC_DIR="gcc-4.8.2"
 GDB_DIR="gdb-7.3.1"
 CMAKE_DIR="cmake-2.8.6"
 HERCULES_DIR="hercules-390"
@@ -17,17 +17,17 @@
 GDB_TAR="${GDB_DIR}.tar.bz2"
 CMAKE_TAR="${CMAKE_DIR}.tar.gz"
 
-GCC_URL="http://mirrors-us.seosue.com/gcc/releases/gcc-4.6.2/${GCC_TAR}"
+GCC_URL="http://gcc.parentingamerica.com/releases/${GCC_DIR}/${GCC_TAR}"
 BINUTILS_URL="http://ftp.gnu.org/gnu/binutils/${BINUTILS_TAR}"
 GMP_URL="ftp://ftp.gnu.org/gnu/gmp/${GMP_TAR}"
 MPFR_URL="http://www.mpfr.org/mpfr-current/${MPFR_TAR}"
 MPC_URL="http://www.multiprecision.org/mpc/download/${MPC_TAR}"
 GDB_URL="http://ftp.gnu.org/gnu/gdb/${GDB_TAR}"
 CMAKE_URL="http://www.cmake.org/files/v2.8/${CMAKE_TAR}"
-HERCULES_REPO="git://github.com/s390guy/hercules-390.git"
+HERCULES_REPO="git://github.com/hercules-390/hyperion.git"
 
 PREFIX=$HOME/bin/cross
-MAKEOPTS=-j6
+MAKEOPTS=-j4
 TARGET=s390x-linux
 CHECKING=release
 #CHECKING=yes,rtl
@@ -36,10 +36,10 @@
 BUILD_GMP=false
 BUILD_MPFR=false
 BUILD_MPC=false
-BUILD_GCC=true
+BUILD_GCC=false
 BUILD_GDB=false
 BUILD_CMAKE=false
-BUILD_HERCULES=false
+BUILD_HERCULES=true
 
 # needed:
 #   pkg:/developer/versioning/mercurial
@@ -59,7 +59,7 @@
 #   pkg:/developer/library/lint
 #   pkg:/system/header
 #   pkg:/system/library/math/header-math
-for x in wget tar patch rm mkdir gmake ar svn grep aclocal-1.10 autoheader \
+for x in wget tar patch rm mkdir gmake ar git grep aclocal-1.10 autoheader \
 		automake-1.10 autoconf ; do
 	which $x 2> /dev/null && continue
 
@@ -72,13 +72,7 @@
 
 if $BUILD_BINUTILS ; then
 	[ ! -e "$BINUTILS_TAR" ] && wget "$BINUTILS_URL"
-	if [ ! -e "$BINUTILS_DIR" ]; then
-		tar xjvf "$BINUTILS_TAR"
-
-		cd "$BINUTILS_DIR"
-		patch -p1 < ../binutils.diff
-		cd ..
-	fi
+	[ ! -e "$BINUTILS_DIR" ] && tar xjvf "$BINUTILS_TAR"
 
 	rm -rf binutils-objs
 	mkdir binutils-objs
@@ -145,8 +139,9 @@
 		--disable-nls --disable-threads --disable-shared \
 		--disable-libmudflap --disable-libssp --disable-libgomp \
 		--disable-decimal-float \
-		--enable-checking=$CHECKING \
-		CFLAGS=-m64
+		--enable-checking=$CHECKING
+	#\
+	#	CFLAGS=-m32
 	LD_LIBRARY_PATH=$PREFIX/lib gmake all-gcc all-target-libgcc $MAKEOPTS
 	gmake install-gcc install-target-libgcc
 	cd ..
@@ -201,6 +196,7 @@
 	mkdir hercules-objs
 	cd hercules-objs
 	../${HERCULES_DIR}/configure \
+		--disable-ipv6 \
 		--prefix=$PREFIX
 	gmake $MAKEOPTS
 	gmake install
--- a/hercules.patch	Mon May 14 15:16:35 2012 -0400
+++ b/hercules.patch	Mon Aug 04 17:40:23 2014 -0400
@@ -1,104 +1,81 @@
 diff --git a/autogen.sh b/autogen.sh
-index 4cb1a4f..ab6e453 100755
+index c4771a1..1c1ead5 100755
 --- a/autogen.sh
 +++ b/autogen.sh
-@@ -21,9 +21,9 @@ EOF
+@@ -17,9 +17,9 @@ EOF
  
  rm -f autogen.log
  
 -echo $ECHO_N "aclocal...    $ECHO_C" && aclocal -I m4 -I autoconf >>./autogen.log 2>&1 && echo "OK.  (25% done)" &&
 +echo $ECHO_N "aclocal...    $ECHO_C" && aclocal-1.10 -I m4 -I autoconf >>./autogen.log 2>&1 && echo "OK.  (25% done)" &&
  echo $ECHO_N "autoheader... $ECHO_C" && autoheader                >>./autogen.log 2>&1 && echo "OK.  (50% done)" &&
--echo $ECHO_N "automake...   $ECHO_C" && automake                  >>./autogen.log 2>&1 && echo "OK.  (75% done)" &&
-+echo $ECHO_N "automake...   $ECHO_C" && automake-1.10             >>./autogen.log 2>&1 && echo "OK.  (75% done)" &&
+-echo $ECHO_N "automake...   $ECHO_C" && automake --add-missing    >>./autogen.log 2>&1 && echo "OK.  (75% done)" &&
++echo $ECHO_N "automake...   $ECHO_C" && automake-1.10 --add-missing    >>./autogen.log 2>&1 && echo "OK.  (75% done)" &&
  echo $ECHO_N "autoconf...   $ECHO_C" && autoconf                  >>./autogen.log 2>&1 && echo "OK.  (100% done)"
  
  R=$?
-diff --git a/cmpsc.h b/cmpsc.h
-index 24e5fd7..8bd2482 100644
---- a/cmpsc.h
-+++ b/cmpsc.h
-@@ -65,10 +65,10 @@ typedef struct CMPSCBLK CMPSCBLK;
- ///////////////////////////////////////////////////////////////////////////////
- // Separate return functions for easier debugging...
- 
--static CMPSC_INLINE U8 (CMPSC_FASTCALL ERR)( CMPSCBLK* pCMPSCBLK );
--static CMPSC_INLINE U8 (CMPSC_FASTCALL CC3)( CMPSCBLK* pCMPSCBLK );
--static CMPSC_INLINE U8 (CMPSC_FASTCALL CC1)( CMPSCBLK* pCMPSCBLK );
--static CMPSC_INLINE U8 (CMPSC_FASTCALL CC0)( CMPSCBLK* pCMPSCBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL ERR)( CMPSCBLK* pCMPSCBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL CC3)( CMPSCBLK* pCMPSCBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL CC1)( CMPSCBLK* pCMPSCBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL CC0)( CMPSCBLK* pCMPSCBLK );
+diff --git a/ctc_ptp.c b/ctc_ptp.c
+index d48b1b3..7da0e3a 100644
+--- a/ctc_ptp.c
++++ b/ctc_ptp.c
+@@ -14,6 +14,7 @@
+ /* 0E20-0E21 PTP <optional parameters>                                */
+ /* See README.NETWORKING for details.                                 */
  
- #define RETERR() return ERR( pCMPSCBLK ) // (failure)
- #define RETCC3() return CC3( pCMPSCBLK ) // (stop)
-@@ -77,11 +77,11 @@ static CMPSC_INLINE U8 (CMPSC_FASTCALL CC0)( CMPSCBLK* pCMPSCBLK );
- 
- typedef struct EXPBLK EXPBLK; // (fwd ref)
++#include <sys/sockio.h>
+ #include "hstdinc.h"
+ #include "hercules.h"
+ #include "ctcadpt.h"
+diff --git a/hifr.h b/hifr.h
+index 54258b3..229a75f 100644
+--- a/hifr.h
++++ b/hifr.h
+@@ -109,7 +109,7 @@ struct hifr
+ };
+ typedef struct hifr hifr;
  
--static CMPSC_INLINE U8 (CMPSC_FASTCALL EXPOK )( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
--static CMPSC_INLINE U8 (CMPSC_FASTCALL EXPERR)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
--static CMPSC_INLINE U8 (CMPSC_FASTCALL EXPCC3)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
--static CMPSC_INLINE U8 (CMPSC_FASTCALL EXPCC1)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
--static CMPSC_INLINE U8 (CMPSC_FASTCALL EXPCC0)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL EXPOK )( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL EXPERR)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL EXPCC3)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL EXPCC1)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
-+CMPSC_INLINE U8 (CMPSC_FASTCALL EXPCC0)( CMPSCBLK* pCMPSCBLK, EXPBLK* pEXPBLK );
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)
+   #define  hifr_name       ifreq.ifr_name
+ #else
+   #define  hifr_name       ifreq.ifr_ifrn.ifrn_name
+diff --git a/qeth.c b/qeth.c
+index e3f2a9a..f05adc1 100644
+--- a/qeth.c
++++ b/qeth.c
+@@ -227,7 +227,7 @@ static BYTE qeth_immed_commands [256] =
+ #define QDSIG_WRIT      5       /* SIGA Initiate Output              */
+ #define QDSIG_WRMULT    6       /* SIGA Initiate Output Multiple     */
  
- #define EXP_RETOK()  return EXPOK ( pCMPSCBLK, pEXPBLK ) // (success; keep going)
- #define EXP_RETERR() return EXPERR( pCMPSCBLK, pEXPBLK ) // (break)
-diff --git a/hscutl.c b/hscutl.c
-index ded92f4..3a73259 100644
---- a/hscutl.c
-+++ b/hscutl.c
-@@ -882,7 +882,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
-     if (rc) WRMSG(HHC02219, "E", "setsockopt(TCP_KEEPALIVE)", strerror(errno));
-   #elif defined(TCP_KEEPIDLE)
-     optval = idle_time;
--    rc = setsockopt(sfd, SOL_TCP, TCP_KEEPIDLE, &optval, sizeof(optval));
-+    rc = setsockopt(sfd, IPPROTO_TCP, TCP_KEEPIDLE, &optval, sizeof(optval));
-     if (rc) WRMSG(HHC02219, "E", "setsockopt(TCP_KEEPIDLE)", strerror(errno));
-   #else
-     UNREFERENCED(idle_time);
-@@ -890,7 +890,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
- 
-   #if defined(TCP_KEEPINTVL)
-     optval = probe_interval;
--    rc = setsockopt(sfd, SOL_TCP, TCP_KEEPINTVL, &optval, sizeof(optval));
-+    rc = setsockopt(sfd, IPPROTO_TCP, TCP_KEEPINTVL, &optval, sizeof(optval));
-     if (rc) WRMSG(HHC02219, "E", "setsockopt(TCP_KEEPALIVE)", strerror(errno));
-   #else
-     UNREFERENCED(probe_interval);
-@@ -898,7 +898,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
+-static const char* sig2str( BYTE sig ) {
++static const char* qsig2str( BYTE sig ) {
+     static const char* sigstr[] = {
+     /*0*/ "QDSIG_RESET",
+     /*1*/ "QDSIG_HALT",
+@@ -3615,7 +3615,7 @@ U32 num;                                /* Number of bytes to move   */
+             {
+                 sig = QDSIG_RESET;
+                 VERIFY( qeth_read_pipe( grp->ppfd[0], &sig ) == 1);
+-                DBGTRC( dev, "Activate Queues: %s received\n", sig2str( sig ));
++                DBGTRC( dev, "Activate Queues: %s received\n", qsig2str( sig ));
  
-   #if defined(TCP_KEEPCNT)
-     optval = probe_count;
--    rc = setsockopt(sfd, SOL_TCP, TCP_KEEPCNT, &optval, sizeof(optval));
-+    rc = setsockopt(sfd, IPPROTO_TCP, TCP_KEEPCNT, &optval, sizeof(optval));
-     if (rc) WRMSG(HHC02219, "E", "setsockopt(TCPKEEPCNT)", strerror(errno));
-   #else
-     UNREFERENCED(probe_count);
-diff --git a/hthreads.h b/hthreads.h
-index ad96e21..a3fc2f0 100644
---- a/hthreads.h
-+++ b/hthreads.h
-@@ -12,7 +12,7 @@
+                 /* Exit immediately when requested to do so */
+                 if (QDSIG_HALT == sig)
+@@ -3810,7 +3810,7 @@ int noselrd, rc = 0;
+         if(noselrd && dev->qdio.i_qmask)
+         {
+             BYTE sig = QDSIG_READ;
+-            DBGTRC( dev, "SIGA-r: sending %s\n", sig2str( sig ));
++            DBGTRC( dev, "SIGA-r: sending %s\n", qsig2str( sig ));
+             VERIFY( qeth_write_pipe( grp->ppfd[1], &sig ) == 1);
+         }
+     }
+@@ -3851,7 +3851,7 @@ OSA_GRP *grp = (OSA_GRP*)dev->group->grp_data;
+     /* Send signal to ACTIVATE QUEUES device thread loop */
+     if(dev->qdio.o_qmask)
+     {
+-        DBGTRC( dev, "SIGA-o: sending %s\n", sig2str( sig ));
++        DBGTRC( dev, "SIGA-o: sending %s\n", qsig2str( sig ));
+         VERIFY( qeth_write_pipe( grp->ppfd[1], &sig ) == 1);
+     }
  
- #if defined(HAVE_SYS_SYSCALL_H) && !defined(HAVE_GETTID)
-  #include <sys/syscall.h>
-- #define gettid() ((pid_t)(syscall(SYS_gettid)))
-+ #define gettid() ((pid_t)(pthread_self()))
-  #define USE_GETTID
- #endif
- 
-diff --git a/po/LINGUAS b/po/LINGUAS
-index 4b82095..c06b424 100644
---- a/po/LINGUAS
-+++ b/po/LINGUAS
-@@ -1,3 +1 @@
- # Set of available languages
--nl
--de