Overview
| Artifact ID: | a4ea6265e4595e3b1fe1f052aa3251a458189766 |
|---|---|
| Ticket: | 443170ffffffffffffffffffffffffffffffffff
Tcl fails to compile on FreeBSD 2.2.x |
| User & Date: | lloydlim on 2001-08-01 04:08:15 |
Changes
- icomment:
Logged In: YES user_id=99220 The above patch works fine when dynamic linking is used. However, when --disable-shared is used and static linking is used to link in the tcl library, the link fails with: ld: No reference to __DYNAMIC *** Error code 1 Stop. This can be reproduced by compiling a very small test program that calls some Tcl routine and linking it as follows: gcc -Wall program.o -Ltcl8.3.3/unix -ltcl83 -lm -static -o program This problem can be solved by switching to a.out format. Here is a new patch that will work with static linking: --- tcl.m4.old Tue Jul 31 09:15:51 2001 +++ tcl.m4 Tue Jul 31 09:18:31 2001 @@ -842,7 +842,7 @@ LDFLAGS="-Wl,-Bexport" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*) + NetBSD-*|OpenBSD-*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ # NetBSD/SPARC needs -fPIC, -fpic will not do. @@ -876,6 +876,22 @@ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' ]) + + # FreeBSD doesn't handle version numbers with dots. + + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + FreeBSD-[[1-2]].*) + SHLIB_CFLAGS="" + SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".a" + DL_OBJS="tclLoadAout.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' # FreeBSD doesn't handle version numbers with dots. - login: "lloydlim"
- mimetype: "text/plain"
- username: "lloydlim"