Check-in [2a3d2138b6]
Overview
SHA1:2a3d2138b6ddba8b142d8aedca0ab50cf3932622
Date: 2014-04-27 05:52:38
User: rkeene
Comment:More work towards getting a usable TclTCC
Timelines: family | ancestors | descendants | both | tcc
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2014-04-28
14:02
[437d69d82c] Updated to include many Tcl symbols (user: rkeene, tags: tcc)
2014-04-27
05:52
[2a3d2138b6] More work towards getting a usable TclTCC (user: rkeene, tags: tcc)
04:17
[2a6f69ee57] Started work on adding TclTCC package (user: rkeene, tags: tcc)
Changes

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

1

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


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

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

135
136
137
138
139
140
141



























142
143
144
145
146
147
148
	pkgIndex="${pkgDir}/pkgIndex.tcl"

	mkdir -p "${pkgDir}"

	cp tcc.tcl "${pkgDir}"
	cp pkgIndex.tcl "${pkgDir}"




























	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --

	exit 0
) || exit 1

exit 0







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|





135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
	pkgIndex="${pkgDir}/pkgIndex.tcl"

	mkdir -p "${pkgDir}"

	cp tcc.tcl "${pkgDir}"
	cp pkgIndex.tcl "${pkgDir}"

	# Install headers needed for compilation
	incDir="${pkgDir}/include"
	mkdir "${incDir}"

	touch include/windows.h
	cp -r include/* "${incDir}"
	cp -r ../../../{tcl,tk}/inst/include/* "${incDir}"

	find "${incDir}" -name '*.a' | xargs rm -f

	# Install libraries
	libDir="${pkgDir}/lib"
	mkdir "${libDir}"

	(
		cd c || exit 1
		rm -f *.a *.o
		for file in *.c; do
			ofile="$(echo "${file}" | sed 's@\.c$@.o@')"
			"${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}"
		done
		"${AR:-ar}" cu ../lib/libtcc1.a *.o
		"${RANLIB:-ranlib}" ../lib/libtcc1.a
	)
	cp lib/libtcc1.a "${libDir}"

	# Create VFS-insert
	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
	find "${OUTDIR}" -name '*.a' -type f | grep -v '/lib/libtcc1\.a$' | xargs rm -f

	exit 0
) || exit 1

exit 0

Added tcc/patches/all/tcltcc-0.4-setincpath.diff version [f1fe8f9975].











































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Common subdirectories: tcltcc-0.4.orig/c and tcltcc-0.4/c
Common subdirectories: tcltcc-0.4.orig/demo and tcltcc-0.4/demo
Common subdirectories: tcltcc-0.4.orig/examples and tcltcc-0.4/examples
Common subdirectories: tcltcc-0.4.orig/generic and tcltcc-0.4/generic
Common subdirectories: tcltcc-0.4.orig/include and tcltcc-0.4/include
Common subdirectories: tcltcc-0.4.orig/install and tcltcc-0.4/install
Common subdirectories: tcltcc-0.4.orig/lib and tcltcc-0.4/lib
diff -u tcltcc-0.4.orig/tcc.tcl tcltcc-0.4/tcc.tcl
--- tcltcc-0.4.orig/tcc.tcl	2014-04-26 23:57:35.522645002 -0500
+++ tcltcc-0.4/tcc.tcl	2014-04-27 00:01:35.492645002 -0500
@@ -101,6 +101,7 @@
       set tcc(cc) tcc1
       tcc $tcc::dir $tcc(cc)
       $tcc(cc) add_library tcl8.5
+      $tcc(cc) add_include_path [file join $::tcc::dir include]
   }
   Log code:$code
   $tcc(cc) compile $code
Common subdirectories: tcltcc-0.4.orig/tclconfig and tcltcc-0.4/tclconfig
Common subdirectories: tcltcc-0.4.orig/tests and tcltcc-0.4/tests
Common subdirectories: tcltcc-0.4.orig/tools and tcltcc-0.4/tools