Check-in [0eca481f01]
Overview
SHA1:0eca481f0182660f8906c399d286de193cde7c34
Date: 2011-03-09 14:35:53
User: rkeene
Comment:Updated to build static library as PIC when building for KitDLL

Fixed issue with Metakit using "g++" for the shared object linker, even when cross-compiling

Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-03-09
14:36
[53587b62ec] Updated to build full Tclkit when cross-compiling to Linux/amd64 (user: rkeene, tags: trunk)
14:35
[0eca481f01] Updated to build static library as PIC when building for KitDLL

Fixed issue with Metakit using "g++" for the shared object linker, even when cross-compiling (user: rkeene, tags: trunk)

2011-03-08
04:23
[5715f1901b] Added build script to cross-compile Linux/amd64 kits (user: rkeene, tags: trunk)
Changes

Modified mk4tcl/build.sh from [9c93a36278] to [1ccf77c409].

84
85
86
87
88
89
90

91
92
93
94
95
96
97
..
99
100
101
102
103
104
105







106
107
108
109
110
111
112
		tryopts="--enable-shared --disable-shared"
	elif [ "${STATICMK4}" = "-1" ]; then
		tryopts="--enable-shared"
	else
		tryopts="--disable-shared"
	fi


	for tryopt in $tryopts __fail__; do
		# Clean up, if needed
		make distclean >/dev/null 2>/dev/null
		rm -rf "${INSTDIR}"
		mkdir "${INSTDIR}"

		if [ "${tryopt}" = "__fail__" ]; then
................................................................................
		fi

		if [ "${tryopt}" == "--enable-shared" ]; then
			isshared="1"
		else
			isshared="0"
		fi








		(
			echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --with-tcl=\"${TCLCONFIGDIR}/../generic\" ${CONFIGUREEXTRA}"
			./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}/../generic" ${CONFIGUREEXTRA}

			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\""
			${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" || exit 1







>







 







>
>
>
>
>
>
>







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
		tryopts="--enable-shared --disable-shared"
	elif [ "${STATICMK4}" = "-1" ]; then
		tryopts="--enable-shared"
	else
		tryopts="--disable-shared"
	fi

	SAVE_CXXFLAGS="${CXXFLAGS}"
	for tryopt in $tryopts __fail__; do
		# Clean up, if needed
		make distclean >/dev/null 2>/dev/null
		rm -rf "${INSTDIR}"
		mkdir "${INSTDIR}"

		if [ "${tryopt}" = "__fail__" ]; then
................................................................................
		fi

		if [ "${tryopt}" == "--enable-shared" ]; then
			isshared="1"
		else
			isshared="0"
		fi

		# If build a static Mk4tcl for KitDLL, ensure that we use PIC
		# so that it can be linked into the shared object
		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then
			CXXFLAGS="${SAVE_CXXFLAGS} -fPIC"
			export CXXFLAGS
		fi

		(
			echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --with-tcl=\"${TCLCONFIGDIR}/../generic\" ${CONFIGUREEXTRA}"
			./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}/../generic" ${CONFIGUREEXTRA}

			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\""
			${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" || exit 1

Added mk4tcl/patches/all/metakit-2.4.9.7-fixsharedobjlinker.diff version [6280191256].





















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
Binary files metakit-2.4.9.7.orig/unix/.Makefile.in.swp and metakit-2.4.9.7-1rsk/unix/.Makefile.in.swp differ
Binary files metakit-2.4.9.7.orig/unix/.configure.in.swp and metakit-2.4.9.7-1rsk/unix/.configure.in.swp differ
diff -uNr metakit-2.4.9.7.orig/unix/configure metakit-2.4.9.7-1rsk/unix/configure
--- metakit-2.4.9.7.orig/unix/configure	2007-06-15 18:26:40.000000000 -0500
+++ metakit-2.4.9.7-1rsk/unix/configure	2011-03-09 07:39:59.000000000 -0600
@@ -1482,7 +1482,7 @@
 if test $SHARED_BUILD = 1; then
   SHLIB_FLAGS="-shared"
   SHLIB_CFLAGS="-fPIC -DUSE_TCL_STUBS"
-  SHLIB_LD="g++ -shared"
+  SHLIB_LD="${CXX} -shared"
 else
   SHLIB_FLAGS=""
   SHLIB_CFLAGS=""
diff -uNr metakit-2.4.9.7.orig/unix/configure.in metakit-2.4.9.7-1rsk/unix/configure.in
--- metakit-2.4.9.7.orig/unix/configure.in	2007-06-15 18:26:40.000000000 -0500
+++ metakit-2.4.9.7-1rsk/unix/configure.in	2011-03-09 07:39:29.000000000 -0600
@@ -117,7 +117,7 @@
 if test $SHARED_BUILD = 1; then
   SHLIB_FLAGS="-shared"
   SHLIB_CFLAGS="-fPIC -DUSE_TCL_STUBS"
-  SHLIB_LD="g++ -shared"
+  SHLIB_LD="${CXX} -shared"
 else
   SHLIB_FLAGS=""
   SHLIB_CFLAGS=""