Check-in [cdcb07f969]
Overview
Comment:More patches to try to make TLS 1.6.7 work
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cdcb07f969aeebb785359132d385b639ee79f700
User & Date: rkeene on 2015-10-28 15:49:44
Other Links: manifest | tags
Context
2016-02-12
16:56
Start testing 8.5.19 check-in: 70021142fe user: rkeene tags: trunk
2015-12-14
21:01
Experimental adjustments to the install targets for Win32. check-in: 2ec7ce2722 user: mistachkin tags: win32-install
2015-10-28
15:49
More patches to try to make TLS 1.6.7 work check-in: cdcb07f969 user: rkeene tags: trunk
15:28
Updated TLS package to 1.6.7, still needs lots of testing since the new TLS package is apparently really broken check-in: e2c7a97b27 user: rkeene tags: trunk
Changes

Modified tls/build.sh from [6f7681a2e1] to [eaa77b3a1b].

    93     93   		tryopts="--disable-shared"
    94     94   	fi
    95     95   
    96     96   	# Disable SSLv2, newer SSL libraries drop support for it entirely
    97     97   	CFLAGS="${CFLAGS} -DNO_SSL2=1"
    98     98   
    99     99   	SAVE_CFLAGS="${CFLAGS}"
          100  +	SAVE_LIBS="${LIBS}"
   100    101   	for tryopt in $tryopts __fail__; do
          102  +		CFLAGS="${SAVE_CFLAGS}"
          103  +		LIBS="${SAVE_LIBS}"
          104  +		export CFLAGS LIBS
          105  +
   101    106   		# Clean up, if needed
   102    107   		make distclean >/dev/null 2>/dev/null
   103    108   		rm -rf "${INSTDIR}"
   104    109   		mkdir "${INSTDIR}"
   105    110   
   106    111   		if [ "${tryopt}" = "__fail__" ]; then
   107    112   			exit 1
................................................................................
   108    113   		fi
   109    114   
   110    115   		if [ "${tryopt}" == "--enable-shared" ]; then
   111    116   			isshared="1"
   112    117   		else
   113    118   			isshared="0"
   114    119   		fi
          120  +
          121  +		# If building a shared TLS, add the LINKADD libraries here
          122  +		if [ "${isshared}" = '1' ]; then
          123  +			LIBS="${LIBS} ${KC_TLS_LINKADD}"
          124  +		fi
   115    125   
   116    126   		# If build a static TLS for KitDLL, ensure that we use PIC
   117    127   		# so that it can be linked into the shared object
   118    128   		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then
   119         -			CFLAGS="${SAVE_CFLAGS} -fPIC"
   120         -		else
   121         -			CFLAGS="${SAVE_CFLAGS}"
          129  +			CFLAGS="${CFLAGS} -fPIC"
   122    130   		fi
   123         -		export CFLAGS
   124    131   
   125    132   		if [ "${isshared}" = '0' ]; then
   126    133   			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
   127    134   		else
   128    135   			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
   129    136   		fi
   130    137   		cat configure.new > configure
................................................................................
   155    162   package ifneeded tls ${TLSVERS} \
   156    163       "[list source [file join \$dir tls.tcl]] ; \
   157    164        [list load {} tls]"
   158    165   _EOF_
   159    166   	fi
   160    167   
   161    168   	# Determine name of static object
   162         -	LINKADDFILE="$(find "${INSTDIR}" -name '*.a' | head -n 1).linkadd"
          169  +	LINKADDFILE="$(find "${INSTDIR}" -name '*.a' | head -n 1)"
          170  +	if [ -n "${LINKADDFILE}" ]; then
          171  +		LINKADDFILE="${LINKADDFILE}.linkadd"
   163    172   
   164    173   	## XXX: TODO: Determine what we actually need to link against
   165    174   	addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto ${KC_TLS_LINKADD}"
   166    175   	addlibs_staticOnly=""
   167    176   	if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
   168    177   		echo "-Wl,-Bstatic ${addlibs} ${addlibs_staticOnly} -Wl,-Bdynamic"
   169    178   	else
   170    179   		echo "${addlibs}"
   171    180   	fi > "${LINKADDFILE}"
          181  +	fi
   172    182   
   173    183   	# Install files needed by installation
   174    184   	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
   175    185   	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --
   176    186   
   177    187   	exit 0
   178    188   ) || exit 1
   179    189   
   180    190   exit 0

Modified tls/patches/all/tls-1.6.7-fixcrosscompile.diff from [91ef31212c] to [66976acd97].

            1  +diff -uNr tls1.6.7.orig/Makefile.in tls1.6.7-fixcrosscompile/Makefile.in
            2  +--- tls1.6.7.orig/Makefile.in	2010-08-11 20:28:06.000000000 -0500
            3  ++++ tls1.6.7-fixcrosscompile/Makefile.in	2015-10-28 10:47:10.714214000 -0500
            4  +@@ -229,7 +229,7 @@
            5  + $(PKG_LIB_FILE): $(PKG_OBJECTS)
            6  + 	-rm -f $(PKG_LIB_FILE)
            7  + 	${MAKE_LIB}
            8  +-	$(RANLIB) $(PKG_LIB_FILE)
            9  ++	-$(RANLIB) $(PKG_LIB_FILE)
           10  + 
           11  + #========================================================================
           12  + # We need to enumerate the list of .c to .o lines here.
     1     13   diff -uNr tls1.6.7.orig/configure tls1.6.7-fixcrosscompile/configure
     2     14   --- tls1.6.7.orig/configure	2015-07-07 12:16:02.000000000 -0500
     3         -+++ tls1.6.7-fixcrosscompile/configure	2015-10-28 09:59:25.414214000 -0500
           15  ++++ tls1.6.7-fixcrosscompile/configure	2015-10-28 10:42:09.324214000 -0500
     4     16   @@ -1387,7 +1387,9 @@
     5     17    fi
     6     18    
     7     19    	    EXEEXT=".exe"
     8     20   -	    TEA_PLATFORM="windows"
     9     21   +		if [ -z "${TEA_PLATFORM}" ]; then
    10     22   +			TEA_PLATFORM="windows"
................................................................................
    39     51   -		    TEA_PLATFORM="unix"
    40     52   +			if [ -z "${TEA_PLATFORM}" ]; then
    41     53   +				TEA_PLATFORM="unix"
    42     54   +			fi
    43     55    		    echo "$as_me:$LINENO: result: unix" >&5
    44     56    echo "${ECHO_T}unix" >&6
    45     57    		    ;;
           58  +@@ -10316,7 +10324,7 @@
           59  +     fi
           60  +     if test -n "${OPENSSL}"; then
           61  + 
           62  +-    vars="ssleay32.lib libeay32.lib"
           63  ++    vars="ssl.lib crypto.lib"
           64  +     for i in $vars; do
           65  + 	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
           66  + 	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib