Index: kitdll/buildsrc/kitdll-0.0/Makefile.in ================================================================== --- kitdll/buildsrc/kitdll-0.0/Makefile.in +++ kitdll/buildsrc/kitdll-0.0/Makefile.in @@ -1,13 +1,15 @@ 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 @@ -29,10 +31,11 @@ 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@ Index: kitdll/buildsrc/kitdll-0.0/aclocal.m4 ================================================================== --- kitdll/buildsrc/kitdll-0.0/aclocal.m4 +++ kitdll/buildsrc/kitdll-0.0/aclocal.m4 @@ -283,10 +283,12 @@ 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 @@ -300,19 +302,23 @@ 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]) @@ -338,20 +344,28 @@ 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)