Overview
Comment: | Moved from tcc to tcc4tcl |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 9c03031641541a4a3212ebbbf83ba8907226f66c |
User & Date: | rkeene on 2014-05-06 05:01:53 |
Other Links: | manifest | tags |
Context
2014-05-06
| ||
05:26 | Updated to not link against libtcc1.a check-in: d56c4a3049 user: rkeene tags: trunk | |
05:01 | Moved from tcc to tcc4tcl check-in: 9c03031641 user: rkeene tags: trunk | |
2014-05-05
| ||
02:46 | Updated tests check-in: c24deea7f7 user: rkeene tags: trunk | |
Changes
Modified .fossil-settings/ignore-glob from [6f2aa7c2a3] to [2c3e9f6547].
80 80 zlib/build.log 81 81 zlib/inst 82 82 zlib/inst/* 83 83 zlib/out 84 84 zlib/out/* 85 85 zlib/src 86 86 zlib/src/* 87 -tcc/build 88 -tcc/build/* 89 -tcc/build.log 90 -tcc/inst 91 -tcc/inst/* 92 -tcc/out 93 -tcc/out/* 94 -tcc/src 95 -tcc/src/* 87 +tcc4tcl/build 88 +tcc4tcl/build/* 89 +tcc4tcl/build.log 90 +tcc4tcl/inst 91 +tcc4tcl/inst/* 92 +tcc4tcl/out 93 +tcc4tcl/out/* 94 +tcc4tcl/src 95 +tcc4tcl/src/* 96 96 kitdll/buildsrc/kitdll-0.0/starpack.vfs 97 97 kitdll/buildsrc/kitdll-0.0/starpack.vfs/* 98 98 kitdll/buildsrc/kitdll-0.0/test 99 99 kitdll/buildsrc/kitdll-0.0/configure 100 100 kitdll/buildsrc/kitdll-0.0/libtcl*.so 101 101 kitdll/buildsrc/kitdll-0.0/Makefile 102 102 kitdll/buildsrc/kitdll-0.0/*.o
Modified kitcreator from [3d5aec022e] to [0ebdeb3250].
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 tcc" 30 +KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx tcc4tcl" 31 31 32 32 # Always rebuild kitsh 33 33 rm -f "kitsh/.success" 34 34 for pkg in ${KITCREATOR_ALLPKGS}; do 35 35 if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then 36 36 rm -f "${pkg}/build.log" "${pkg}/.success" 37 37 rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
Deleted tcc/build.sh version [bb5492c154].
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 -PATCHSCRIPTDIR="$(pwd)/patchscripts" 21 -PATCHDIR="$(pwd)/patches" 22 -export TCLTCCVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR 23 - 24 -# Set configure options for this sub-project 25 -LDFLAGS="${KC_TCLTCC_LDFLAGS}" 26 -CFLAGS="${KC_TCLTCC_CFLAGS}" 27 -CPPFLAGS="${KC_TCLTCC_CPPFLAGS}" 28 -LIBS="${KC_TCLTCC_LIBS}" 29 -export LDFLAGS CFLAGS CPPFLAGS LIBS 30 - 31 -rm -rf 'build' 'out' 'inst' 32 -mkdir 'build' 'out' 'inst' || exit 1 33 - 34 -TCL_VERSION="unknown" 35 -if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then 36 - source "${TCLCONFIGDIR}/tclConfig.sh" 37 -fi 38 -export TCL_VERSION 39 - 40 -if [ ! -f "${SRC}" ]; then 41 - mkdir 'src' >/dev/null 2>/dev/null 42 - 43 - if [ ! -d 'buildsrc' ]; then 44 - rm -f "${SRC}.tmp" 45 - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 46 - mv "${SRC}.tmp" "${SRC}" 47 - fi 48 -fi 49 - 50 -( 51 - cd 'build' || exit 1 52 - 53 - if [ ! -d '../buildsrc' ]; then 54 - mkdir "${BUILDDIR}" || exit 1 55 - ( 56 - cd "${BUILDDIR}" || exit 1 57 - unzip "../../${SRC}" 58 - ) 59 - else 60 - cp -rp ../buildsrc/* './' 61 - fi 62 - 63 - # Apply required patches 64 - cd "${BUILDDIR}" || exit 1 65 - 66 - # Install current Tcl headers 67 - cp -r ../../../{tcl,tk}/inst/include/* include/ 68 - 69 - for patch in "${PATCHDIR}/all"/tcltcc-${TCLTCCVERS}-*.diff "${PATCHDIR}/${TCL_VERSION}"/tcltcc-${TCLTCCVERS}-*.diff; do 70 - if [ ! -f "${patch}" ]; then 71 - continue 72 - fi 73 - 74 - echo "Applying: ${patch}" 75 - ${PATCH:-patch} -p1 < "${patch}" 76 - done 77 - 78 - # Apply patch scripts if needed 79 - for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do 80 - if [ -f "${patchscript}" ]; then 81 - echo "Running patch script: ${patchscript}" 82 - 83 - ( 84 - . "${patchscript}" 85 - ) 86 - fi 87 - done 88 - 89 - # Try to build as a shared object if requested 90 - if [ "${STATICTCLTCC}" = "0" ]; then 91 - tryopts="--enable-shared --disable-shared" 92 - elif [ "${STATICTCLTCC}" = "-1" ]; then 93 - tryopts="--enable-shared" 94 - else 95 - tryopts="--disable-shared" 96 - fi 97 - 98 - SAVE_CFLAGS="${CFLAGS}" 99 - for tryopt in $tryopts __fail__; do 100 - # Clean up, if needed 101 - make distclean >/dev/null 2>/dev/null 102 - rm -rf "${INSTDIR}" 103 - mkdir "${INSTDIR}" 104 - 105 - if [ "${tryopt}" = "__fail__" ]; then 106 - exit 1 107 - fi 108 - 109 - if [ "${tryopt}" == "--enable-shared" ]; then 110 - isshared="1" 111 - else 112 - isshared="0" 113 - fi 114 - 115 - # If build a static TclX for KitDLL, ensure that we use PIC 116 - # so that it can be linked into the shared object 117 - if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then 118 - CFLAGS="${SAVE_CFLAGS} -fPIC" 119 - else 120 - CFLAGS="${SAVE_CFLAGS}" 121 - fi 122 - 123 - if [ "${isshared}" = "0" ]; then 124 - CFLAGS="${CFLAGS} -DCONFIG_TCC_STATIC=1" 125 - fi 126 - export CFLAGS 127 - 128 - if [ "${isshared}" = '0' ]; then 129 - sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new 130 - else 131 - sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new 132 - fi 133 - cat configure.new > configure 134 - rm -f configure.new 135 - chmod +x configure 136 - 137 - ( 138 - echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}" 139 - ./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} 140 - 141 - echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\"" 142 - ${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" || exit 1 143 - 144 - echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\" install" 145 - ${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" install || exit 1 146 - ) || continue 147 - 148 - break 149 - done 150 - 151 - # Install files needed by installation 152 - pkgDir="${INSTDIR}/lib/tcc${TCLTCCVERS}" 153 - pkgIndex="${pkgDir}/pkgIndex.tcl" 154 - 155 - mkdir -p "${pkgDir}" 156 - 157 - cp tcc.tcl "${pkgDir}" 158 - cp pkgIndex.tcl "${pkgDir}" 159 - 160 - # Install headers needed for compilation 161 - incDir="${pkgDir}/include" 162 - mkdir "${incDir}" 163 - 164 - touch include/windows.h 165 - cp -r include/* "${incDir}" 166 - 167 - find "${incDir}" -name '*.a' | xargs rm -f 168 - 169 - # Install libraries 170 - libDir="${pkgDir}/lib" 171 - mkdir "${libDir}" 172 - 173 - ( 174 - cd c || exit 1 175 - rm -f *.a *.o 176 - for file in *.c; do 177 - ofile="$(echo "${file}" | sed 's@\.c$@.o@')" 178 - "${CC:-gcc}" -I../include -I../../../../{tcl,tk}/inst/include/ -I../../../../tcl/build/tcl${TCLVERS}/generic/ -I../../../../tcl/build/tcl${TCLVERS}/unix/ -DUSE_TCL_STUBS=1 -c "${file}" -o "${ofile}" 179 - done 180 - "${AR:-ar}" rcu ../lib/libtcc1.a *.o 181 - "${RANLIB:-ranlib}" ../lib/libtcc1.a 182 - ) 183 - cp lib/libtcc1.a "${libDir}" 184 - 185 - # Create VFS-insert 186 - cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1 187 - find "${OUTDIR}" -name '*.a' -type f | grep -v '/lib/libtcc1\.a$' | xargs rm -f 188 - 189 - exit 0 190 -) || exit 1 191 - 192 -exit 0
Deleted tcc/patches/all/tcltcc-0.4-erroronunsupported.diff version [e47fbc9f65].
1 -diff -uNr tcltcc-0.4.orig/generic/tcc.h tcltcc-0.4-1erroronunsupported/generic/tcc.h 2 ---- tcltcc-0.4.orig/generic/tcc.h 2007-11-07 10:04:32.000000000 -0600 3 -+++ tcltcc-0.4-1erroronunsupported/generic/tcc.h 2014-04-28 16:34:24.600645002 -0500 4 -@@ -21,6 +21,10 @@ 5 - #include "config.h" 6 - #include "tcl.h" 7 - 8 -+#if defined(__x86_64__) 9 -+# error "KitCreator TclTCC: Unsupported platform" 10 -+#endif 11 -+ 12 - #ifdef CONFIG_TCCBOOT 13 - 14 - #include "tccboot.h"
Deleted 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
Deleted tcc/patches/all/tcltcc-0.4-fixstaticwin32.diff version [20767a1a7f].
1 -diff -uNr tcltcc-0.4.orig/generic/win32/tccpe.c tcltcc-0.4-1fixstaticwin32/generic/win32/tccpe.c 2 ---- tcltcc-0.4.orig/generic/win32/tccpe.c 2007-11-07 10:04:32.000000000 -0600 3 -+++ tcltcc-0.4-1fixstaticwin32/generic/win32/tccpe.c 2014-04-28 15:19:49.340645002 -0500 4 -@@ -397,7 +397,7 @@ 5 - return sym_index; 6 - } 7 - 8 --#ifdef WIN32 9 -+#if defined(WIN32) && !defined(CONFIG_TCC_STATIC) 10 - ST void **pe_imp; 11 - ST int nb_pe_imp; 12 -
Deleted tcc/patches/all/tcltcc-0.4-setincpath.diff version [f1fe8f9975].
1 -Common subdirectories: tcltcc-0.4.orig/c and tcltcc-0.4/c 2 -Common subdirectories: tcltcc-0.4.orig/demo and tcltcc-0.4/demo 3 -Common subdirectories: tcltcc-0.4.orig/examples and tcltcc-0.4/examples 4 -Common subdirectories: tcltcc-0.4.orig/generic and tcltcc-0.4/generic 5 -Common subdirectories: tcltcc-0.4.orig/include and tcltcc-0.4/include 6 -Common subdirectories: tcltcc-0.4.orig/install and tcltcc-0.4/install 7 -Common subdirectories: tcltcc-0.4.orig/lib and tcltcc-0.4/lib 8 -diff -u tcltcc-0.4.orig/tcc.tcl tcltcc-0.4/tcc.tcl 9 ---- tcltcc-0.4.orig/tcc.tcl 2014-04-26 23:57:35.522645002 -0500 10 -+++ tcltcc-0.4/tcc.tcl 2014-04-27 00:01:35.492645002 -0500 11 -@@ -101,6 +101,7 @@ 12 - set tcc(cc) tcc1 13 - tcc $tcc::dir $tcc(cc) 14 - $tcc(cc) add_library tcl8.5 15 -+ $tcc(cc) add_include_path [file join $::tcc::dir include] 16 - } 17 - Log code:$code 18 - $tcc(cc) compile $code 19 -Common subdirectories: tcltcc-0.4.orig/tclconfig and tcltcc-0.4/tclconfig 20 -Common subdirectories: tcltcc-0.4.orig/tests and tcltcc-0.4/tests 21 -Common subdirectories: tcltcc-0.4.orig/tools and tcltcc-0.4/tools
Deleted tcc/patchscripts/tcltcc-0.4-addtclfuncs.sh version [f0194cd9c1].
1 -#! /bin/bash 2 - 3 -function find_syms() { 4 - ${CC:-gcc} ${CPPFLAGS} -E include/tcl.h | grep '^ *extern.*Tcl_'| sed 's@^ *extern *@@;s@([^(]*$@@;s@.* *\** *@@' | sort -u | grep '^Tcl_' | grep -v ';$' | while read -r sym; do 5 - echo " TCCSYM($sym)" 6 - done 7 -} 8 - 9 -add="$(find_syms)" 10 - 11 -awk -v add="${add}" '/TCCSyms tcc_syms.*=/{ 12 - print 13 - print add 14 - next 15 -} { print }' generic/tcc.h > generic/tcc.h.new 16 -cat generic/tcc.h.new > generic/tcc.h 17 -rm -f generic/tcc.h.new 18 - 19 -exit 0
Added tcc4tcl/build.sh version [c3ecd9940b].
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 +TCC4TCLVERS="0.5" 15 +SRC="src/tcc4tcl-${TCC4TCLVERS}.tar.gz" 16 +SRCURL="http://rkeene.org/devel/tcc4tcl/tcc4tcl-${TCC4TCLVERS}.tar.gz" 17 +BUILDDIR="$(pwd)/build/tcc4tcl-${TCC4TCLVERS}" 18 +OUTDIR="$(pwd)/out" 19 +INSTDIR="$(pwd)/inst" 20 +PATCHDIR="$(pwd)/patches" 21 +export TCC4TCLVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR 22 + 23 +# Set configure options for this sub-project 24 +LDFLAGS="${KC_TCC4TCL_LDFLAGS}" 25 +CFLAGS="${KC_TCC4TCL_CFLAGS}" 26 +CPPFLAGS="${KC_TCC4TCL_CPPFLAGS}" 27 +LIBS="${KC_TCC4TCL_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 + gzip -dc "../${SRC}" | tar -xf - 54 + else 55 + cp -rp ../buildsrc/* './' 56 + fi 57 + 58 + # Apply required patches 59 + cd "${BUILDDIR}" || exit 1 60 + 61 + for patch in "${PATCHDIR}/all"/tcc4tcl-${TCC4TCLVERS}-*.diff "${PATCHDIR}/${TCL_VERSION}"/tcc4tcl-${TCC4TCLVERS}-*.diff; do 62 + if [ ! -f "${patch}" ]; then 63 + continue 64 + fi 65 + 66 + echo "Applying: ${patch}" 67 + ${PATCH:-patch} -p1 < "${patch}" 68 + done 69 + 70 + # Try to build as a shared object if requested 71 + if [ "${STATICTCC4TCL}" = "0" ]; then 72 + tryopts="--enable-shared --disable-shared" 73 + elif [ "${STATICTCC4TCL}" = "-1" ]; then 74 + # Require shared object if requested 75 + tryopts="--enable-shared" 76 + else 77 + # Default to building statically 78 + tryopts="--disable-shared" 79 + fi 80 + 81 + SAVE_CFLAGS="${CFLAGS}" 82 + for tryopt in $tryopts __fail__; do 83 + # Clean up, if needed 84 + make distclean >/dev/null 2>/dev/null 85 + rm -rf "${INSTDIR}" 86 + mkdir "${INSTDIR}" 87 + 88 + if [ "${tryopt}" = "__fail__" ]; then 89 + exit 1 90 + fi 91 + 92 + if [ "${tryopt}" == "--enable-shared" ]; then 93 + isshared="1" 94 + else 95 + isshared="0" 96 + fi 97 + 98 + # If build a static tcc4tcl for KitDLL, ensure that we use PIC 99 + # so that it can be linked into the shared object 100 + if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then 101 + CFLAGS="${SAVE_CFLAGS} -fPIC" 102 + else 103 + CFLAGS="${SAVE_CFLAGS}" 104 + fi 105 + 106 + ( 107 + echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}" 108 + ./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} 109 + 110 + echo "Running: ${MAKE:-make}" 111 + ${MAKE:-make} || exit 1 112 + 113 + echo "Running: ${MAKE:-make} install" 114 + ${MAKE:-make} install || exit 1 115 + ) || continue 116 + 117 + break 118 + done 119 + 120 + # Create VFS-insert 121 + cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1 122 + find "${OUTDIR}" -name '*.a' -type f | grep -v '/libtcc1\.a$' | xargs rm -f 123 + 124 + exit 0 125 +) || exit 1 126 + 127 +exit 0