changeset 5:adc0911de0f7

update build.sh - hercules repo & patch
author Josef 'Jeff' Sipek <jsipek@barracuda.com>
date Mon, 14 May 2012 15:16:35 -0400
parents 459550954634
children 4b740bf0d945
files build.sh hercules.patch
diffstat 2 files changed, 56 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Sat Nov 19 22:10:43 2011 -0500
+++ b/build.sh	Mon May 14 15:16:35 2012 -0400
@@ -7,7 +7,7 @@
 MPC_DIR="mpc-0.9"
 GDB_DIR="gdb-7.3.1"
 CMAKE_DIR="cmake-2.8.6"
-HERCULES_DIR="hercules-svn"
+HERCULES_DIR="hercules-390"
 
 GCC_TAR="${GCC_DIR}.tar.bz2"
 BINUTILS_TAR="${BINUTILS_DIR}.tar.bz2"
@@ -24,7 +24,7 @@
 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="svn://svn.hercules-390.org/hercules/trunk"
+HERCULES_REPO="git://github.com/s390guy/hercules-390.git"
 
 PREFIX=$HOME/bin/cross
 MAKEOPTS=-j6
@@ -32,10 +32,10 @@
 CHECKING=release
 #CHECKING=yes,rtl
 
-BUILD_BINUTILS=true
-BUILD_GMP=true
-BUILD_MPFR=true
-BUILD_MPC=true
+BUILD_BINUTILS=false
+BUILD_GMP=false
+BUILD_MPFR=false
+BUILD_MPC=false
 BUILD_GCC=true
 BUILD_GDB=false
 BUILD_CMAKE=false
@@ -117,7 +117,7 @@
 
 if $BUILD_MPC ; then
 	[ ! -e "$MPC_TAR" ] && wget "$MPC_URL"
-	[ ! -e "$MPC_DIR" ] && tar xjvf "$MPC_TAR"
+	[ ! -e "$MPC_DIR" ] && tar xzvf "$MPC_TAR"
 
 	rm -rf mpc-objs
 	mkdir mpc-objs
@@ -145,7 +145,8 @@
 		--disable-nls --disable-threads --disable-shared \
 		--disable-libmudflap --disable-libssp --disable-libgomp \
 		--disable-decimal-float \
-		--enable-checking=$CHECKING 
+		--enable-checking=$CHECKING \
+		CFLAGS=-m64
 	LD_LIBRARY_PATH=$PREFIX/lib gmake all-gcc all-target-libgcc $MAKEOPTS
 	gmake install-gcc install-target-libgcc
 	cd ..
@@ -188,12 +189,12 @@
 
 if $BUILD_HERCULES ; then
 	if [ ! -e "$HERCULES_DIR" ]; then
-	       svn checkout $HERCULES_REPO $HERCULES_DIR
+		git clone $HERCULES_REPO $HERCULES_DIR
 
-	       cd $HERCULES_DIR
-	       patch -p1 < ../hercules.patch
-	       sh ./autogen.sh
-	       cd ..
+		cd $HERCULES_DIR
+		patch -p1 < ../hercules.patch
+		sh ./autogen.sh
+		cd ..
 	fi
 
 	rm -rf hercules-objs
--- a/hercules.patch	Sat Nov 19 22:10:43 2011 -0500
+++ b/hercules.patch	Mon May 14 15:16:35 2012 -0400
@@ -1,5 +1,5 @@
 diff --git a/autogen.sh b/autogen.sh
-index 4cb1a4f..ab6e453 100644
+index 4cb1a4f..ab6e453 100755
 --- a/autogen.sh
 +++ b/autogen.sh
 @@ -21,9 +21,9 @@ EOF
@@ -14,24 +14,47 @@
  echo $ECHO_N "autoconf...   $ECHO_C" && autoconf                  >>./autogen.log 2>&1 && echo "OK.  (100% done)"
  
  R=$?
-diff --git a/hercifc.h b/hercifc.h
-index e4c9bd1..ed82872 100644
---- a/hercifc.h
-+++ b/hercifc.h
-@@ -49,7 +49,7 @@
-   /* The in6_ifreq structure can be found in include/linux/ipv6.h */
-   struct in6_ifreq {
-     struct in6_addr ifr6_addr;
--    __u32   ifr6_prefixlen;
-+    uint32_t   ifr6_prefixlen;
-     int   ifr6_ifindex;
-   };
+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 );
  
+ #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)
+ 
+-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 );
+ 
+ #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 1b244e7..2e6df26 100644
+index ded92f4..3a73259 100644
 --- a/hscutl.c
 +++ b/hscutl.c
-@@ -884,7 +884,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
+@@ -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;
@@ -40,7 +63,7 @@
      if (rc) WRMSG(HHC02219, "E", "setsockopt(TCP_KEEPIDLE)", strerror(errno));
    #else
      UNREFERENCED(idle_time);
-@@ -892,7 +892,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
+@@ -890,7 +890,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
  
    #if defined(TCP_KEEPINTVL)
      optval = probe_interval;
@@ -49,7 +72,7 @@
      if (rc) WRMSG(HHC02219, "E", "setsockopt(TCP_KEEPALIVE)", strerror(errno));
    #else
      UNREFERENCED(probe_interval);
-@@ -900,7 +900,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
+@@ -898,7 +898,7 @@ void socket_keepalive( int sfd, int idle_time, int probe_interval,
  
    #if defined(TCP_KEEPCNT)
      optval = probe_count;
@@ -59,10 +82,10 @@
    #else
      UNREFERENCED(probe_count);
 diff --git a/hthreads.h b/hthreads.h
-index 7d0182e..4cdab8b 100644
+index ad96e21..a3fc2f0 100644
 --- a/hthreads.h
 +++ b/hthreads.h
-@@ -15,7 +15,7 @@
+@@ -12,7 +12,7 @@
  
  #if defined(HAVE_SYS_SYSCALL_H) && !defined(HAVE_GETTID)
   #include <sys/syscall.h>