Check-in [93b2be7812]
Overview
Comment:Updated with fixes for TCC on Win32
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcc
Files: files | file ages | folders
SHA1: 93b2be78123ddd47c52ad272740d7148016d891d
User & Date: rkeene on 2014-04-28 20:36:03
Other Links: branch diff | manifest | tags
Context
2014-04-28
20:36
Added TclTCC check-in: c8641be07e user: rkeene tags: trunk
20:36
Updated with fixes for TCC on Win32 Closed-Leaf check-in: 93b2be7812 user: rkeene tags: tcc
16:33
Updated to more accepting of C compilers when fixing up TCC check-in: 35718d9982 user: rkeene tags: tcc
Changes

Added tcc/patches/all/tcltcc-0.4-fixstaticwin32.diff version [20767a1a7f].













1
2
3
4
5
6
7
8
9
10
11
12
+
+
+
+
+
+
+
+
+
+
+
+
diff -uNr tcltcc-0.4.orig/generic/win32/tccpe.c tcltcc-0.4-1fixstaticwin32/generic/win32/tccpe.c
--- tcltcc-0.4.orig/generic/win32/tccpe.c	2007-11-07 10:04:32.000000000 -0600
+++ tcltcc-0.4-1fixstaticwin32/generic/win32/tccpe.c	2014-04-28 15:19:49.340645002 -0500
@@ -397,7 +397,7 @@
     return sym_index;
 }
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(CONFIG_TCC_STATIC)
 ST void **pe_imp;
 ST int nb_pe_imp;
 

Modified tcc/patchscripts/tcltcc-0.4-addtclfuncs.sh from [b31d022289] to [b66c99e82c].

1
2


3
4
5
6
7

8
9
10
11
12
13

14
15
16
17
18
19
20
1
2
3
4
5




6



7


8
9
10
11
12
13
14
15


+
+

-
-
-
-
+
-
-
-

-
-
+







#! /bin/bash

set -x

function find_syms() {
	if [ -z "${NM}" ]; then
		if echo "${CC}" | sed 's@ .*$@@' | grep '[-]' >/dev/null; then
			NM="$(echo "${CC}" | sed 's@ .*$@@;s@\(.*\)-[^-]*$@\1-nm@')"
		else
	set -x
			NM='nm'
		fi
	fi

	# "${NM}" "${LIBTCL}" | sed 's@:.*$@@' | sed 's@.* @@' | grep '^Tcl_' | sort -u | while read -r sym; do
	${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
	${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
		echo "    TCCSYM($sym)"
	done
}

add="$(find_syms)"

awk -v add="${add}" '/TCCSyms tcc_syms.*=/{