Check-in [365a853bd5]
Overview
Comment:Fixed issues causing static KitDLL from not getting built
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | feature-kitdll-static
Files: files | file ages | folders
SHA1:365a853bd5251aa1593502ca36260eb47fff2db9
User & Date: rkeene on 2016-02-24 20:23:40
Other Links: manifest | tags
Context
2016-02-24
20:26
Created a mechanism for specifying which KitDLL to build check-in: eb5004bca0 user: rkeene tags: feature-kitdll-static
20:23
Fixed issues causing static KitDLL from not getting built check-in: 365a853bd5 user: rkeene tags: feature-kitdll-static
20:10
Merged duplicate branches check-in: 5ed2993b61 user: rkeene tags: feature-kitdll-static
Changes

Modified kitsh/buildsrc/kitsh-0.0/Makefile.kitdll.in from [36bd975f50] to [6164206d04].

    15     15   	-mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe; \
    16     16   		$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(ARCHS) @NOWHOLEARCHIVE@ $(LIBS) || \
    17     17   			mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
    18     18   	-rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe
    19     19   
    20     20   ## Static archive build
    21     21   libtclkit@KITDLL_LIB_VERSION@.a: $(OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS)
    22         -        rm -f libtclkit@KITDLL_LIB_VERSION@.a.new
    23         -        rm -rf __TMP__
    24         -        mkdir __TMP__
    25         -        for arch in $(ARCHS); do ( cd __TMP__ && ar x ../$${arch} ); done
    26         -        $(OBJCOPY) --redefine-sym Tcl_Init=Tcl_InitReal __TMP__/tclInterp.o
    27         -        $(AR) cr libtclkit@KITDLL_LIB_VERSION@.a.new $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) __TMP__/*.o
    28         -        rm -rf __TMP__
    29         -        $(RANLIB) libtclkit@KITDLL_LIB_VERSION@.a.new
    30         -        mv libtclkit@KITDLL_LIB_VERSION@.a.new libtclkit@KITDLL_LIB_VERSION@.a
           22  +	rm -f libtclkit@KITDLL_LIB_VERSION@.a.new
           23  +	rm -rf __TMP__
           24  +	mkdir __TMP__
           25  +	for arch in $(ARCHS); do ( cd __TMP__ && ar x ../$${arch} ); done
           26  +	$(OBJCOPY) --redefine-sym Tcl_Init=Tcl_InitReal __TMP__/tclInterp.o
           27  +	$(AR) cr libtclkit@KITDLL_LIB_VERSION@.a.new $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) __TMP__/*.o
           28  +	rm -rf __TMP__
           29  +	$(RANLIB) libtclkit@KITDLL_LIB_VERSION@.a.new
           30  +	mv libtclkit@KITDLL_LIB_VERSION@.a.new libtclkit@KITDLL_LIB_VERSION@.a
    31     31   
    32     32   # Test driver
    33     33   tclsh.o: tclsh.c
    34         -tclsh: tclsh.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
           34  +tclsh: tclsh.o $(EXTRA_OBJS) @TARGET@
    35     35   	$(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH)
    36     36   
    37     37   wish.o: wish.c
    38     38   wish: wish.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@
    39     39   	$(CC) $(CPPFLAGS) $(CFLAGS) $(WISH_CFLAGS) -o wish wish.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH)
    40     40   
    41     41   .PHONY: kitdll kitdll-static

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [dc51bae560] to [77fa1a4052].

    15     15   AC_ARG_ENABLE(kitdll, AC_HELP_STRING([--enable-kitdll], [Enable building KitDLL instead of Tclkit (default: no)]), [
    16     16   	AS_CASE([$enableval],
    17     17   		[yes|kitdll], [
    18     18   			TARGET="kitdll"
    19     19   		],
    20     20   		static, [
    21     21   			TARGET="kitdll-static"
    22         -		]
           22  +		],
    23     23   		no, [
    24     24   			true
    25     25   		], [
    26     26   			AC_MSG_RESULT([unknown])
    27     27   
    28     28   			AC_MSG_ERROR([Invalid option: $enableval])
    29     29   		]
................................................................................
    34     34   
    35     35   dnl Find the appropriate libraries to link to
    36     36   AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ])
    37     37   AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])
    38     38   
    39     39   AS_IF([test "$TARGET" = "tclkit"], [
    40     40   	dnl We have Tclkit
           41  +	TARGET_BASE='tclkit'
    41     42   
    42     43   	dnl Specify local Appinit function
    43     44   	AC_DEFINE(TK_LOCAL_APPINIT, [TclKit_AppInit], [Tclkit appinit function])
           45  +
    44     46   ], [
    45     47   	dnl We have KitDLL
           48  +	TARGET_BASE='kitdll'
    46     49   
    47     50   	dnl Determine system information
    48     51   	DC_CHK_OS_INFO
    49     52   
    50     53   	dnl Determine how to create a shared object
    51     54   	DC_GET_SHOBJFLAGS
    52     55   
................................................................................
    54     57   	AC_CHECK_TOOL(OBJCOPY, objcopy, [:])
    55     58   
    56     59   	dnl Define KitDLL usage
    57     60   	AC_DEFINE([TCLKIT_DLL], [1], [Define if you are using a KitDLL rather than a Tclkit])
    58     61   
    59     62   	dnl Define a static KitDLL
    60     63   	AS_IF([test "$TARGET" = "kitdll-static"], [
           64  +		AC_CHECK_TOOL(RANLIB, [ranlib], [:])
           65  +		AC_CHECK_TOOL(AR, [ar], [false MISSING AR])
           66  +
    61     67   		AC_DEFINE([TCLKIT_DLL_STATIC], [1], [Define if you are building a static KitDLL])
    62         -		SHOBJE
    63     68   	])
    64     69   ])
    65     70   
    66     71   dnl Figure out how to statically link to libgcc, if needed
    67     72   DC_STATIC_LIBGCC
    68     73   
    69     74   dnl Set linker rpath for tclsh/wish
................................................................................
   207    212   )
   208    213   
   209    214   AC_SUBST(EXTRA_KIT_DEPS)
   210    215   AC_SUBST(LDFLAGS_ADD)
   211    216   
   212    217   dnl Put correct Makefile template in place
   213    218   rm -f Makefile.in
   214         -cp Makefile.${TARGET}.in Makefile.in
          219  +cp Makefile.${TARGET_BASE}.in Makefile.in
   215    220   
   216    221   dnl Produce output
   217    222   AC_OUTPUT(Makefile Makefile.common)