Check-in [d68d005c05]
Overview
Comment:Updated to support Solaris method of specifying the whole archive
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d68d005c054c1f577596743c837fef5a091876fe
User & Date: rkeene on 2010-10-04 18:20:16
Other Links: manifest | tags
Context
2010-10-04
18:25
Fixed order of whole-archive checking since GNU ld will succeed and ignore options check-in: 2eebe5c20b user: rkeene tags: trunk
18:20
Updated to support Solaris method of specifying the whole archive check-in: d68d005c05 user: rkeene tags: trunk
04:53
Added comments to Threads test check-in: 15bb35cd1b user: rkeene tags: trunk
Changes

Modified kitdll/buildsrc/kitdll-0.0/Makefile.in from [99ca289f2a] to [a127167bc9].

26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
26
27
28
29
30
31
32

33
34
35
36
37
38
39
40







-
+








## Extensions
rechan.o: rechan.c
pwb.o: pwb.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) -Wl,--whole-archive $(STATICLIBS) -Wl,--no-whole-archive $(LIBS)
	$(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,.

wish.o: wish.c

Modified kitdll/buildsrc/kitdll-0.0/aclocal.m4 from [7417677dde] to [0b9994b3dd].

215
216
217
218
219
220
221

222
223
224

225
226
227
228
229
230
231
215
216
217
218
219
220
221
222
223
224

225
226
227
228
229
230
231
232







+


-
+







		cygwin*)
			CFLAGS="${CFLAGS} -mms-bitfields"
			;;
	esac
])

AC_DEFUN(DC_TEST_WHOLE_ARCHIVE_SHARED_LIB, [

	SAVE_LIBS="${LIBS}"

	LIBS="-Wl,--whole-archive $1 -Wl,--no-whole-archive ${SAVE_LIBS}"
	LIBS="${WHOLEARCHIVE} $1 ${NOWHOLEARCHIVE} ${SAVE_LIBS}"
	AC_LINK_IFELSE(
		AC_LANG_PROGRAM([[
			]], [[
			]]
		),
		[
			LIBS="${SAVE_LIBS}"
239
240
241
242
243
244
245



246
247
248
249
250
251
252
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256







+
+
+







	)
])

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

	for proj in tcl tclvfs tk; do
		AC_MSG_CHECKING([for libraries required for ${proj}])

		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" ' '`"
325
326
327
328
329
330
331



































329
330
331
332
333
334
335
336
337
338
339
340
341
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







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
			AC_MSG_RESULT([found])
			AC_DEFINE(HAVE_ACCEPTABLE_DLADDR, [1], [Define to 1 if you have an acceptable dladdr implementation with dli_fname])
		], [
			AC_MSG_RESULT([not found])
		]
	)
])

AC_DEFUN(DC_CHECK_FOR_WHOLE_ARCHIVE, [
	AC_MSG_CHECKING([for how to link whole archive])

	SAVE_CFLAGS="${CFLAGS}"

	wholearchive=""

	for check in "-Wl,-z,allextract -Wl,-z,defaultextract" "-Wl,--whole-archive -Wl,--no-whole-archive"; do
		CFLAGS="${SAVE_CFLAGS} ${check}"

		AC_LINK_IFELSE(AC_LANG_PROGRAM([], []),
			[
				wholearchive="${check}"

				break
			]
		)

	done

	CFLAGS="${SAVE_CFLAGS}"

	if test -z "${wholearchive}"; then
		AC_MSG_RESULT([not found])
	else
		AC_MSG_RESULT([${wholearchive}])

		WHOLEARCHIVE=`echo "${wholearchive}" | cut -f 1 -d ' '`
		NOWHOLEARCHIVE=`echo "${wholearchive}" | cut -f 2 -d ' '`
	fi

	AC_SUBST(WHOLEARCHIVE)
	AC_SUBST(NOWHOLEARCHIVE)
])