Check-in [af522d011f]
Overview
SHA1:af522d011fff43d1d5bd679f9e4016ffd798ebbb
Date: 2011-03-07 07:02:39
User: rkeene
Comment:Updated to weaken symbols from non-Tcl/Tk related libraries in KitDLL
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-03-08
03:50
[de3aacd495] Updated to build with new toolchain (user: rkeene, tags: trunk)
2011-03-07
07:02
[af522d011f] Updated to weaken symbols from non-Tcl/Tk related libraries in KitDLL (user: rkeene, tags: trunk)
2011-03-04
19:00
[acdbe69639] Updated documentation and tests to reflect change to remove bundled packages during a minimal build (user: rkeene, tags: trunk)
Changes

Modified kitdll/buildsrc/kitdll-0.0/Makefile.in from [024981b5ad] to [54a46a52d1].

1

2
3
4
5
6
7
8

9
10
11
12
13
14
15
..
27
28
29
30
31
32
33

34
35
36
37
38
39
40
CC = @CC@

CFLAGS = @CFLAGS@ @SHOBJFLAGS@ -Wall
CPPFLAGS = @CPPFLAGS@ @DEFS@ -DKITDLL_MAKE_LOADABLE=1
WISH_CFLAGS = @WISH_CFLAGS@
LDFLAGS = @LDFLAGS@
SHOBJLDFLAGS = @SHOBJLDFLAGS@
LIBS = @LIBS@
STATICLIBS = @ARCHS@

OBJS = vfs_kitdll_data_tcl.o kitInit.o rechan.o pwb.o zlib.o
EXTRA_OBJS = @EXTRA_OBJS@
TCLSH_NATIVE = tclsh

# Default target
all: libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@

................................................................................
## Extensions
rechan.o: rechan.c
pwb.o: pwb.c
zlib.o: zlib.c

## DLL Build
libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@: $(OBJS) $(EXTRA_OBJS)

	$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(STATICLIBS) @NOWHOLEARCHIVE@ $(LIBS)

# Test driver
tclsh.o: tclsh.c
tclsh: tclsh.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
	$(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ -Wl,-rpath,.


>







>







 







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
CC = @CC@
OBJCOPY = @OBJCOPY@
CFLAGS = @CFLAGS@ @SHOBJFLAGS@ -Wall
CPPFLAGS = @CPPFLAGS@ @DEFS@ -DKITDLL_MAKE_LOADABLE=1
WISH_CFLAGS = @WISH_CFLAGS@
LDFLAGS = @LDFLAGS@
SHOBJLDFLAGS = @SHOBJLDFLAGS@
LIBS = @LIBS@
STATICLIBS = @ARCHS@
STRIPLIBS = @STRIPLIBS@ @EXTRA_OBJS@
OBJS = vfs_kitdll_data_tcl.o kitInit.o rechan.o pwb.o zlib.o
EXTRA_OBJS = @EXTRA_OBJS@
TCLSH_NATIVE = tclsh

# Default target
all: libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@

................................................................................
## Extensions
rechan.o: rechan.c
pwb.o: pwb.c
zlib.o: zlib.c

## DLL Build
libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@: $(OBJS) $(EXTRA_OBJS)
	-for striplib in $(STRIPLIBS); do $(OBJCOPY) --weaken "$${striplib}"; done
	$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(STATICLIBS) @NOWHOLEARCHIVE@ $(LIBS)

# Test driver
tclsh.o: tclsh.c
tclsh: tclsh.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
	$(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ -Wl,-rpath,.

Modified kitdll/buildsrc/kitdll-0.0/aclocal.m4 from [57e33ec54f] to [0c2240a08b].

281
282
283
284
285
286
287


288
289
290
291
292
293
294
...
298
299
300
301
302
303
304


305
306
307
308
309
310
311
312
313


314
315
316
317
318
319
320
...
336
337
338
339
340
341
342


343
344
345
346
347
348





349
350
351
352

353
354
355
356
357
358
359
	dnl Sun Studio uses -lCstd -lCrun, most platforms use -lstdc++
	DC_DO_STATIC_LINK_LIB([C++ Library (Sun Studio)], [-lCstd -lCrun],, [
		DC_DO_STATIC_LINK_LIB([C++ Library (UNIX)], [-lstdc++])
	])
])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [


	DC_SETUP_TCL_PLAT_DEFS

	WISH_CFLAGS=""

	dnl We will need this for the Tcl project, which we will always have
	DC_CHECK_FOR_WHOLE_ARCHIVE

................................................................................
		libdir="../../../${proj}/inst"
		libfiles="`find "${libdir}" -name '*.a' 2>/dev/null | tr "\n" ' '`"
		libfilesnostub="`find "${libdir}" -name '*.a' 2>/dev/null | grep -v 'stub' | tr "\n" ' '`"

		for libfile in ${libfiles}; do
			LDFLAGS="${LDFLAGS} -L`dirname "${libfile}"`"
		done



		if test "$proj" = "tcl"; then
			DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfilesnostub], [
				libfiles="${libfilesnostub}"
			], [
				DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfiles], [
					libfiles="${libfiles}"
				])
			])


		fi

		if test "${proj}" = "mk4tcl"; then
			if test -n "$libfiles"; then
				AC_DEFINE(KIT_INCLUDES_MK4TCL, [1], [Specify this if you link against mkt4tcl])
				DC_DO_STATIC_LINK_LIBCXX
			fi
................................................................................
				if test -n "${TK_VERSION}"; then
					AC_DEFINE_UNQUOTED(KIT_TK_VERSION, "${TK_VERSION}${TK_PATCH_LEVEL}", [Specify the version of Tk])
				fi

				if test "$host_os" = "mingw32msvc" -o "$host_os" = "mingw32"; then
					WISH_CFLAGS="-mwindows"
				fi


			fi
		fi

		ARCHS="${ARCHS} ${libfiles}"

		AC_MSG_RESULT([${libfiles}])





	done

	AC_SUBST(WISH_CFLAGS)
	AC_SUBST(ARCHS)

])

AC_DEFUN(DC_CHECK_FOR_ACCEPTABLE_DLADDR, [
	AC_CHECK_HEADERS(dlfcn.h)
	AC_CHECK_FUNCS(dladdr)

	AC_MSG_CHECKING([for acceptable dladdr])







>
>







 







>
>









>
>







 







>
>






>
>
>
>
>




>







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
...
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
...
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
	dnl Sun Studio uses -lCstd -lCrun, most platforms use -lstdc++
	DC_DO_STATIC_LINK_LIB([C++ Library (Sun Studio)], [-lCstd -lCrun],, [
		DC_DO_STATIC_LINK_LIB([C++ Library (UNIX)], [-lstdc++])
	])
])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
	AC_CHECK_TOOL(OBJCOPY, objcopy, [:])

	DC_SETUP_TCL_PLAT_DEFS

	WISH_CFLAGS=""

	dnl We will need this for the Tcl project, which we will always have
	DC_CHECK_FOR_WHOLE_ARCHIVE

................................................................................
		libdir="../../../${proj}/inst"
		libfiles="`find "${libdir}" -name '*.a' 2>/dev/null | tr "\n" ' '`"
		libfilesnostub="`find "${libdir}" -name '*.a' 2>/dev/null | grep -v 'stub' | tr "\n" ' '`"

		for libfile in ${libfiles}; do
			LDFLAGS="${LDFLAGS} -L`dirname "${libfile}"`"
		done

		hide_symbols="1"

		if test "$proj" = "tcl"; then
			DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfilesnostub], [
				libfiles="${libfilesnostub}"
			], [
				DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfiles], [
					libfiles="${libfiles}"
				])
			])

			hide_symbols="0"
		fi

		if test "${proj}" = "mk4tcl"; then
			if test -n "$libfiles"; then
				AC_DEFINE(KIT_INCLUDES_MK4TCL, [1], [Specify this if you link against mkt4tcl])
				DC_DO_STATIC_LINK_LIBCXX
			fi
................................................................................
				if test -n "${TK_VERSION}"; then
					AC_DEFINE_UNQUOTED(KIT_TK_VERSION, "${TK_VERSION}${TK_PATCH_LEVEL}", [Specify the version of Tk])
				fi

				if test "$host_os" = "mingw32msvc" -o "$host_os" = "mingw32"; then
					WISH_CFLAGS="-mwindows"
				fi

				hide_symbols="0"
			fi
		fi

		ARCHS="${ARCHS} ${libfiles}"

		AC_MSG_RESULT([${libfiles}])

		if test "${hide_symbols}" = "1"; then
			STRIPLIBS="${STRIPLIBS} ${libfiles}"
		fi

	done

	AC_SUBST(WISH_CFLAGS)
	AC_SUBST(ARCHS)
	AC_SUBST(STRIPLIBS)
])

AC_DEFUN(DC_CHECK_FOR_ACCEPTABLE_DLADDR, [
	AC_CHECK_HEADERS(dlfcn.h)
	AC_CHECK_FUNCS(dladdr)

	AC_MSG_CHECKING([for acceptable dladdr])