Index: build/make-minkit ================================================================== --- build/make-minkit +++ build/make-minkit @@ -1,9 +1,13 @@ #! /bin/sh # Build minimalistic tclkit -KITCREATOR_PKGS=" " +if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null; then + KITCREATOR_PKGS="kitdll" +else + KITCREATOR_PKGS=" " +fi KITCREATOR_MINENCODINGS='true' KITCREATOR_MINBUILD='true' export KITCREATOR_PKGS KITCREATOR_MINENCODINGS KITCREATOR_MINBUILD ./kitcreator "$@" Index: build/make-minkit-static ================================================================== --- build/make-minkit-static +++ build/make-minkit-static @@ -2,18 +2,15 @@ # Set C compiler to diet libc CC='diet gcc' export CC -rm -rf tcl/patchscripts -mkdir tcl/patchscripts || exit 1 - cat << \__EOF__ > tcl/patchscripts/dietlibc.sh sed 's@^# *include *$@&@;T s;p;s@string.h@strings.h@;:s' generic/tclInt.h > generic/tclInt.h.new && cat generic/tclInt.h.new > generic/tclInt.h rm -f generic/tclInt.h.new __EOF__ ./build/make-minkit "$@" --disable-load --disable-threads -rm -rf tcl/patchscripts +rm -f tcl/patchscripts/dietlibc.sh exit 0 Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -58,11 +58,14 @@ # Apply patch scripts if needed for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do if [ -f "${patchscript}" ]; then echo "Running patch script: ${patchscript}" - . "${patchscript}" + + ( + . "${patchscript}" + ) fi done # Patch Win32 builds to always provide DllMain if we are building KitDLL if [ "${KITTARGET}" = "kitdll" ]; then Index: tclvfs/build.sh ================================================================== --- tclvfs/build.sh +++ tclvfs/build.sh @@ -68,10 +68,16 @@ export TEA_PLATFORM CFLAGS="${CFLAGS} -I${TCLCONFIGDIR}" export CFLAGS fi + + # If we are building for KitDLL, compile with '-fPIC' + if [ "${KITTARGET}" = "kitdll" ]; then + CFLAGS="${CFLAGS} -fPIC" + export CFLAGS + fi # Build static version echo "Running: ./configure --disable-shared --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}" ./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}