Check-in [2a3d2138b6]
Overview
Comment:More work towards getting a usable TclTCC
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcc
Files: files | file ages | folders
SHA1:2a3d2138b6ddba8b142d8aedca0ab50cf3932622
User & Date: rkeene on 2014-04-27 05:52:38
Other Links: manifest | tags
Context
2014-04-28
14:02
Updated to include many Tcl symbols check-in: 437d69d82c user: rkeene tags: tcc
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
Changes

Modified .fossil-settings/crnl-glob from [8f8dd7e7df] to [f35e2eb18c].

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

Modified tcc/build.sh from [09ccdfc66e] to [bdd97ba1c5].

   135    135   	pkgIndex="${pkgDir}/pkgIndex.tcl"
   136    136   
   137    137   	mkdir -p "${pkgDir}"
   138    138   
   139    139   	cp tcc.tcl "${pkgDir}"
   140    140   	cp pkgIndex.tcl "${pkgDir}"
   141    141   
          142  +	# Install headers needed for compilation
          143  +	incDir="${pkgDir}/include"
          144  +	mkdir "${incDir}"
          145  +
          146  +	touch include/windows.h
          147  +	cp -r include/* "${incDir}"
          148  +	cp -r ../../../{tcl,tk}/inst/include/* "${incDir}"
          149  +
          150  +	find "${incDir}" -name '*.a' | xargs rm -f
          151  +
          152  +	# Install libraries
          153  +	libDir="${pkgDir}/lib"
          154  +	mkdir "${libDir}"
          155  +
          156  +	(
          157  +		cd c || exit 1
          158  +		rm -f *.a *.o
          159  +		for file in *.c; do
          160  +			ofile="$(echo "${file}" | sed 's@\.c$@.o@')"
          161  +			"${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}"
          162  +		done
          163  +		"${AR:-ar}" cu ../lib/libtcc1.a *.o
          164  +		"${RANLIB:-ranlib}" ../lib/libtcc1.a
          165  +	)
          166  +	cp lib/libtcc1.a "${libDir}"
          167  +
          168  +	# Create VFS-insert
   142    169   	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
   143         -	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --
          170  +	find "${OUTDIR}" -name '*.a' -type f | grep -v '/lib/libtcc1\.a$' | xargs rm -f
   144    171   
   145    172   	exit 0
   146    173   ) || exit 1
   147    174   
   148    175   exit 0

Added 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