Check-in [2a6f69ee57]
Overview
Comment:Started work on adding TclTCC package
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcc
Files: files | file ages | folders
SHA1:2a6f69ee57e3f7b2de7924dee48457f60408e4d6
User & Date: rkeene on 2014-04-27 04:17:16
Other Links: manifest | tags
Context
2014-04-27
05:52
More work towards getting a usable TclTCC check-in: 2a3d2138b6 user: rkeene tags: tcc
04:17
Started work on adding TclTCC package check-in: 2a6f69ee57 user: rkeene tags: tcc
04:13
Work towards upgrading zlib -- untested on most platforms check-in: 1a5bbc4282 user: rkeene tags: trunk
Changes

Added .fossil-settings/crnl-glob version [8f8dd7e7df].

            1  +tcc/patches/all/tcltcc-0.4-fixloading.diff

Added .fossil-settings/ignore-glob version [1a05efe8ce].

            1  +build/test/kits
            2  +build/test/kits/*
            3  +itcl/build
            4  +itcl/build/*
            5  +itcl/build.log
            6  +itcl/inst
            7  +itcl/inst/*
            8  +itcl/out
            9  +itcl/out/*
           10  +itcl/src
           11  +itcl/src/*
           12  +kitsh/build
           13  +kitsh/build/*
           14  +kitsh/build.log
           15  +kitsh/buildsrc/kitsh-0.0/Makefile
           16  +kitsh/buildsrc/kitsh-0.0/autom4te.cache
           17  +kitsh/buildsrc/kitsh-0.0/autom4te.cache/*
           18  +kitsh/buildsrc/kitsh-0.0/boot.tcl.h
           19  +kitsh/buildsrc/kitsh-0.0/config.h
           20  +kitsh/buildsrc/kitsh-0.0/config.h.in
           21  +kitsh/buildsrc/kitsh-0.0/config.log
           22  +kitsh/buildsrc/kitsh-0.0/config.status
           23  +kitsh/buildsrc/kitsh-0.0/configure
           24  +kitsh/buildsrc/kitsh-0.0/kit
           25  +kitsh/buildsrc/kitsh-0.0/zipvfs.tcl.h
           26  +kitsh/inst
           27  +kitsh/inst/*
           28  +kitsh/out
           29  +kitsh/out/*
           30  +mk4tcl/build
           31  +mk4tcl/build/*
           32  +mk4tcl/build.log
           33  +mk4tcl/inst
           34  +mk4tcl/inst/*
           35  +mk4tcl/out
           36  +mk4tcl/out/*
           37  +mk4tcl/src
           38  +mk4tcl/src/*
           39  +tcl/build
           40  +tcl/build/*
           41  +tcl/build.log
           42  +tcl/inst
           43  +tcl/inst/*
           44  +tcl/out
           45  +tcl/out/*
           46  +tcl/src
           47  +tcl/src/*
           48  +tclkit-*
           49  +tclkit-*/*
           50  +tclvfs/build
           51  +tclvfs/build/*
           52  +tclvfs/build.log
           53  +tclvfs/inst
           54  +tclvfs/inst/*
           55  +tclvfs/out
           56  +tclvfs/out/*
           57  +tclvfs/src
           58  +tclvfs/src/*
           59  +thread/build
           60  +thread/build/*
           61  +thread/build.log
           62  +thread/inst
           63  +thread/inst/*
           64  +thread/out
           65  +thread/out/*
           66  +thread/src
           67  +thread/src/*
           68  +tk/build
           69  +tk/build/*
           70  +tk/build.log
           71  +tk/inst
           72  +tk/inst/*
           73  +tk/out
           74  +tk/out/*
           75  +tk/src
           76  +tk/src/*
           77  +zlib/build
           78  +zlib/build/*
           79  +zlib/build.log
           80  +zlib/inst
           81  +zlib/inst/*
           82  +zlib/out
           83  +zlib/out/*
           84  +zlib/src
           85  +zlib/src/*
           86  +tcc/build
           87  +tcc/build/*
           88  +tcc/build.log
           89  +tcc/inst
           90  +tcc/inst/*
           91  +tcc/out
           92  +tcc/out/*
           93  +tcc/src
           94  +tcc/src/*
           95  +kitdll/buildsrc/kitdll-0.0/starpack.vfs
           96  +kitdll/buildsrc/kitdll-0.0/starpack.vfs/*
           97  +kitdll/buildsrc/kitdll-0.0/test
           98  +kitdll/buildsrc/kitdll-0.0/configure
           99  +kitdll/buildsrc/kitdll-0.0/libtcl*.so
          100  +kitdll/buildsrc/kitdll-0.0/Makefile
          101  +kitdll/buildsrc/kitdll-0.0/*.o
          102  +kitdll/buildsrc/kitdll-0.0/config.log
          103  +kitdll/buildsrc/kitdll-0.0/config.status
          104  +kitdll/buildsrc/kitdll-0.0/vfs_kitdll_data_tcl.c
          105  +kitdll/buildsrc/kitdll-0.0/vfs_kitdll.tcl.h
          106  +kitdll/build/kitdll-*
          107  +kitdll/build/kitdll-*/*
          108  +kitdll/build.log
          109  +libtclkit-*.*

Modified kitcreator from [e140ad3217] to [3d5aec022e].

    23     23   if [ -f 'build/pre.sh' ]; then
    24     24   	if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then
    25     25   		echo "Please remember to run 'build/pre.sh' if you expect this build to work." >&2
    26     26   	fi
    27     27   fi
    28     28   
    29     29   # Define the list of all packages, for cleaning purposes
    30         -KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx"
           30  +KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx tcc"
           31  +
    31     32   # Always rebuild kitsh
    32     33   rm -f "kitsh/.success"
    33     34   for pkg in ${KITCREATOR_ALLPKGS}; do
    34     35   	if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then
    35     36   		rm -f "${pkg}/build.log" "${pkg}/.success"
    36     37   		rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
    37     38   

Added tcc/build.sh version [09ccdfc66e].

            1  +#! /usr/bin/env bash
            2  +
            3  +if [ ! -f 'build.sh' ]; then
            4  +	echo 'ERROR: This script must be run from the directory it is in' >&2
            5  +
            6  +	exit 1
            7  +fi
            8  +if [ -z "${TCLVERS}" ]; then
            9  +	echo 'ERROR: The TCLVERS environment variable is not set' >&2
           10  +
           11  +	exit 1
           12  +fi
           13  +
           14  +TCLTCCVERS="0.4"
           15  +SRC="src/tcltcc-${TCLTCCVERS}.zip"
           16  +SRCURL="https://tcltcc.googlecode.com/files/tcltcc${TCLTCCVERS}.zip"
           17  +BUILDDIR="$(pwd)/build/tcltcc-0.4"
           18  +OUTDIR="$(pwd)/out"
           19  +INSTDIR="$(pwd)/inst"
           20  +PATCHDIR="$(pwd)/patches"
           21  +export TCLTCCVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
           22  +
           23  +# Set configure options for this sub-project
           24  +LDFLAGS="${KC_TCLTCC_LDFLAGS}"
           25  +CFLAGS="${KC_TCLTCC_CFLAGS}"
           26  +CPPFLAGS="${KC_TCLTCC_CPPFLAGS}"
           27  +LIBS="${KC_TCLTCC_LIBS}"
           28  +export LDFLAGS CFLAGS CPPFLAGS LIBS
           29  +
           30  +rm -rf 'build' 'out' 'inst'
           31  +mkdir 'build' 'out' 'inst' || exit 1
           32  +
           33  +TCL_VERSION="unknown"
           34  +if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
           35  +        source "${TCLCONFIGDIR}/tclConfig.sh"
           36  +fi
           37  +export TCL_VERSION
           38  +
           39  +if [ ! -f "${SRC}" ]; then
           40  +	mkdir 'src' >/dev/null 2>/dev/null
           41  +
           42  +	if [ ! -d 'buildsrc' ]; then
           43  +		rm -f "${SRC}.tmp"
           44  +		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
           45  +		mv "${SRC}.tmp" "${SRC}"
           46  +	fi
           47  +fi
           48  +
           49  +(
           50  +	cd 'build' || exit 1
           51  +
           52  +	if [ ! -d '../buildsrc' ]; then
           53  +		mkdir "${BUILDDIR}" || exit 1
           54  +		(
           55  +			cd "${BUILDDIR}" || exit 1
           56  +			unzip "../../${SRC}"
           57  +		)
           58  +	else    
           59  +		cp -rp ../buildsrc/* './'
           60  +	fi
           61  +
           62  +	# Apply required patches
           63  +	cd "${BUILDDIR}" || exit 1
           64  +	for patch in "${PATCHDIR}/all"/tcltcc-${TCLTCCVERS}-*.diff "${PATCHDIR}/${TCL_VERSION}"/tcltcc-${TCLTCCVERS}-*.diff; do
           65  +		if [ ! -f "${patch}" ]; then
           66  +			continue
           67  +		fi
           68  +
           69  +		echo "Applying: ${patch}"
           70  +		${PATCH:-patch} -p1 < "${patch}"
           71  +	done
           72  +
           73  +	cd "${BUILDDIR}" || exit 1
           74  +
           75  +	# Try to build as a shared object if requested
           76  +	if [ "${STATICTCLTCC}" = "0" ]; then
           77  +		tryopts="--enable-shared --disable-shared"
           78  +	elif [ "${STATICTCLTCC}" = "-1" ]; then
           79  +		tryopts="--enable-shared"
           80  +	else
           81  +		tryopts="--disable-shared"
           82  +	fi
           83  +
           84  +	SAVE_CFLAGS="${CFLAGS}"
           85  +	for tryopt in $tryopts __fail__; do
           86  +		# Clean up, if needed
           87  +		make distclean >/dev/null 2>/dev/null
           88  +		rm -rf "${INSTDIR}"
           89  +		mkdir "${INSTDIR}"
           90  +
           91  +		if [ "${tryopt}" = "__fail__" ]; then
           92  +			exit 1
           93  +		fi
           94  +
           95  +		if [ "${tryopt}" == "--enable-shared" ]; then
           96  +			isshared="1"
           97  +		else
           98  +			isshared="0"
           99  +		fi
          100  +
          101  +		# If build a static TclX for KitDLL, ensure that we use PIC
          102  +		# so that it can be linked into the shared object
          103  +		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then
          104  +			CFLAGS="${SAVE_CFLAGS} -fPIC"
          105  +		else
          106  +			CFLAGS="${SAVE_CFLAGS}"
          107  +		fi
          108  +		export CFLAGS
          109  +
          110  +		if [ "${isshared}" = '0' ]; then
          111  +			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
          112  +		else
          113  +			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
          114  +		fi
          115  +		cat configure.new > configure
          116  +		rm -f configure.new
          117  +		chmod +x configure
          118  +
          119  +		(
          120  +			echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
          121  +			./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
          122  +
          123  +			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\""
          124  +			${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" || exit 1
          125  +
          126  +			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\" install"
          127  +			${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" install || exit 1
          128  +		) || continue
          129  +
          130  +		break
          131  +	done
          132  +
          133  +	# Install files needed by installation
          134  +	pkgDir="${INSTDIR}/lib/tcc${TCLTCCVERS}"
          135  +	pkgIndex="${pkgDir}/pkgIndex.tcl"
          136  +
          137  +	mkdir -p "${pkgDir}"
          138  +
          139  +	cp tcc.tcl "${pkgDir}"
          140  +	cp pkgIndex.tcl "${pkgDir}"
          141  +
          142  +	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
          143  +	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --
          144  +
          145  +	exit 0
          146  +) || exit 1
          147  +
          148  +exit 0

Added tcc/patches/all/tcltcc-0.4-fixloading.diff version [59d3bfe7e9].

            1  +--- tcltcc-0.4.orig/tcc.tcl	2007-11-07 10:04:42.000000000 -0600
            2  ++++ tcltcc-0.4/tcc.tcl	2014-04-26 23:06:24.272645002 -0500
            3  +@@ -9,10 +9,15 @@
            4  +    variable commands
            5  + 
            6  +    set dir [file dirname [info script]]
            7  +-   switch -exact -- $::tcl_platform(platform) {
            8  +-	   windows { load $dir/tcc02.dll tcc }
            9  +-	   unix { load $dir/libtcc0.2.so tcc }
           10  +-	   default {error "unsupport platform"}
           11  ++   if {[info command ::tcc] == ""} {
           12  ++      catch { load {} tcc }
           13  ++   }
           14  ++   if {[info command ::tcc] == ""} {
           15  ++       switch -exact -- $::tcl_platform(platform) {
           16  ++	       windows { load $dir/tcc04.dll tcc }
           17  ++	       unix { load $dir/libtcc0.4.so tcc }
           18  ++	       default {error "unsupport platform"}
           19  ++       }
           20  +    }
           21  +    set libs $dir/lib
           22  +    set includes $dir/include