Overview
| Comment: | Added start of KitDLL static building |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | feature-kitdll-static |
| Files: | files | file ages | folders |
| SHA1: |
44e46cf7398396ce42d812c7d3a1a024 |
| User & Date: | rkeene on 2016-02-24 20:08:09 |
| Other Links: | branch diff | manifest | tags |
Context
|
2016-02-24
| ||
| 20:10 | Merged duplicate branches check-in: 5ed2993b61 user: rkeene tags: feature-kitdll-static | |
| 20:08 | Added start of KitDLL static building check-in: 44e46cf739 user: rkeene tags: feature-kitdll-static | |
| 20:00 | Added Tcl 8.5.19 to the web interface check-in: f71b69d91f user: rkeene tags: trunk | |
Changes
Modified kitsh/build.sh from [fe33f09af3] to [e30417e077].
| ︙ | ︙ | |||
111 112 113 114 115 116 117 |
fi
# Cleanup
rm -f kit kit.exe tclsh tclsh.exe
# Determine if target is KitDLL or KitSH
if [ "${KITTARGET}" = "kitdll" ]; then
| | | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
fi
# Cleanup
rm -f kit kit.exe tclsh tclsh.exe
# Determine if target is KitDLL or KitSH
if [ "${KITTARGET}" = "kitdll" ]; then
CONFIGUREEXTRA="${CONFIGUREEXTRA} --enable-kitdll=static"
fi
# Compile Kit
if [ -z "${ZLIBDIR}" ]; then
echo "Running: ./configure --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
./configure --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
|
| ︙ | ︙ | |||
164 165 166 167 168 169 170 |
if [ "${KITTARGET}" = "kitdll" ]; then
## Find the library created
for chkkittarget in libtclkit*.*; do
if [ ! -f "${chkkittarget}" ]; then
continue
fi
| | | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
if [ "${KITTARGET}" = "kitdll" ]; then
## Find the library created
for chkkittarget in libtclkit*.*; do
if [ ! -f "${chkkittarget}" ]; then
continue
fi
if echo "${chkkittarget}" | egrep '\..*\.(lib|def|a)$'; then
continue
fi
KITTARGET_NAME="./${chkkittarget}"
break
done
|
| ︙ | ︙ |
Modified kitsh/buildsrc/kitsh-0.0/Makefile.common.in from [93d968f811] to [bfce9994ae].
| ︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | EXTRA_OBJS = @EXTRA_OBJS@ LDRUNPATH = @LDRUNPATH@ EXTRA_KIT_DEPS = @EXTRA_KIT_DEPS@ EXTRA_VFS_OBJS = @EXTRA_VFS_OBJS@ TCLSH_NATIVE = tclsh LDFLAGS_ADD = @LDFLAGS_ADD@ DIR2C_FLAGS = @DIR2C_FLAGS@ # Build targets ## VFS Build cvfs_data_tcl.o: cvfs_data_tcl.c cvfs_data_tcl.c: dir2c.tcl starpack.vfs cvfs_data.c "$(TCLSH_NATIVE)" dir2c.tcl tcl starpack.vfs $(DIR2C_FLAGS) > cvfs_data_tcl.c | > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | EXTRA_OBJS = @EXTRA_OBJS@ LDRUNPATH = @LDRUNPATH@ EXTRA_KIT_DEPS = @EXTRA_KIT_DEPS@ EXTRA_VFS_OBJS = @EXTRA_VFS_OBJS@ TCLSH_NATIVE = tclsh LDFLAGS_ADD = @LDFLAGS_ADD@ DIR2C_FLAGS = @DIR2C_FLAGS@ AR = @AR@ RANLIB = @RANLIB@ # Build targets ## VFS Build cvfs_data_tcl.o: cvfs_data_tcl.c cvfs_data_tcl.c: dir2c.tcl starpack.vfs cvfs_data.c "$(TCLSH_NATIVE)" dir2c.tcl tcl starpack.vfs $(DIR2C_FLAGS) > cvfs_data_tcl.c |
| ︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ### Windows resources kit.res.o: kit.rc tclkit.ico $(RC) -o kit.res.o $(CPPFLAGS) kit.rc # Cleanup routines clean: rm -f kit kit.res.o rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ rm -f $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) rm -f cvfs_data_tcl.c cvfs_data_tcl.o rm -f cvfs.tcl.h rm -f tclsh.o tclsh tclsh.exe rm -f wish.o wish wish.exe | > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ### Windows resources kit.res.o: kit.rc tclkit.ico $(RC) -o kit.res.o $(CPPFLAGS) kit.rc # Cleanup routines clean: rm -rf __TMP__ rm -f kit kit.res.o rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ rm -f $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) rm -f cvfs_data_tcl.c cvfs_data_tcl.o rm -f cvfs.tcl.h rm -f tclsh.o tclsh tclsh.exe rm -f wish.o wish wish.exe |
| ︙ | ︙ |
Modified kitsh/buildsrc/kitsh-0.0/Makefile.kitdll.in from [05829b4d07] to [36bd975f50].
1 2 3 | OBJS = kitInit.o rechan.o pwb.o zlib.o # Default target | | > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
OBJS = kitInit.o rechan.o pwb.o zlib.o
# Default target
all: @TARGET@
-include Makefile.common
kitdll: libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
kitdll-static: libtclkit@KITDLL_LIB_VERSION@.a
## DLL Build
libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@: $(OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS)
$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(ARCHS) @NOWHOLEARCHIVE@ $(LIBS) $(LDFLAGS_ADD)
-for striplib in $(STRIPLIBS); do $(OBJCOPY) --weaken "$${striplib}"; done
-mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe; \
$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(ARCHS) @NOWHOLEARCHIVE@ $(LIBS) || \
mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
-rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe
## Static archive build
libtclkit@KITDLL_LIB_VERSION@.a: $(OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS)
rm -f libtclkit@KITDLL_LIB_VERSION@.a.new
rm -rf __TMP__
mkdir __TMP__
for arch in $(ARCHS); do ( cd __TMP__ && ar x ../$${arch} ); done
$(OBJCOPY) --redefine-sym Tcl_Init=Tcl_InitReal __TMP__/tclInterp.o
$(AR) cr libtclkit@KITDLL_LIB_VERSION@.a.new $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) __TMP__/*.o
rm -rf __TMP__
$(RANLIB) libtclkit@KITDLL_LIB_VERSION@.a.new
mv libtclkit@KITDLL_LIB_VERSION@.a.new libtclkit@KITDLL_LIB_VERSION@.a
# 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@ $(LDRUNPATH)
wish.o: wish.c
wish: wish.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
$(CC) $(CPPFLAGS) $(CFLAGS) $(WISH_CFLAGS) -o wish wish.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH)
.PHONY: kitdll kitdll-static
|
Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [42d57f3f66] to [dc51bae560].
| ︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | EXTRA_KIT_DEPS="" AC_MSG_CHECKING([what target to build]) AC_ARG_ENABLE(kitdll, AC_HELP_STRING([--enable-kitdll], [Enable building KitDLL instead of Tclkit (default: no)]), [ AS_CASE([$enableval], [yes|kitdll], [ TARGET="kitdll" ], no, [ true ], [ AC_MSG_RESULT([unknown]) AC_MSG_ERROR([Invalid option: $enableval]) ] ) ]) AC_MSG_RESULT([$TARGET]) dnl Find the appropriate libraries to link to AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ]) AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ]) AS_IF([test "$TARGET" = "tclkit"], [ dnl We have Tclkit | > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | EXTRA_KIT_DEPS="" AC_MSG_CHECKING([what target to build]) AC_ARG_ENABLE(kitdll, AC_HELP_STRING([--enable-kitdll], [Enable building KitDLL instead of Tclkit (default: no)]), [ AS_CASE([$enableval], [yes|kitdll], [ TARGET="kitdll" ], static, [ TARGET="kitdll-static" ] no, [ true ], [ AC_MSG_RESULT([unknown]) AC_MSG_ERROR([Invalid option: $enableval]) ] ) ]) AC_MSG_RESULT([$TARGET]) AC_SUBST(TARGET) dnl Find the appropriate libraries to link to AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ]) AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ]) AS_IF([test "$TARGET" = "tclkit"], [ dnl We have Tclkit |
| ︙ | ︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 59 60 | DC_GET_SHOBJFLAGS dnl Determine if we have "objcopy" available to weaken non-Tcl/Tk symbols AC_CHECK_TOOL(OBJCOPY, objcopy, [:]) dnl Define KitDLL usage AC_DEFINE([TCLKIT_DLL], [1], [Define if you are using a KitDLL rather than a Tclkit]) ]) dnl Figure out how to statically link to libgcc, if needed DC_STATIC_LIBGCC dnl Set linker rpath for tclsh/wish DC_SETLDRUNPATH([.]) | > > > > > > | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | DC_GET_SHOBJFLAGS dnl Determine if we have "objcopy" available to weaken non-Tcl/Tk symbols AC_CHECK_TOOL(OBJCOPY, objcopy, [:]) dnl Define KitDLL usage AC_DEFINE([TCLKIT_DLL], [1], [Define if you are using a KitDLL rather than a Tclkit]) dnl Define a static KitDLL AS_IF([test "$TARGET" = "kitdll-static"], [ AC_DEFINE([TCLKIT_DLL_STATIC], [1], [Define if you are building a static KitDLL]) SHOBJE ]) ]) dnl Figure out how to statically link to libgcc, if needed DC_STATIC_LIBGCC dnl Set linker rpath for tclsh/wish DC_SETLDRUNPATH([.]) |
| ︙ | ︙ |