summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-03-25 22:49:14 +0000
committerjlam <jlam@pkgsrc.org>2004-03-25 22:49:14 +0000
commit98196bcc44d4a230ceaf4da519191df61ec8d425 (patch)
treed70a95ffaab53503f76288ea77adbef4c158558d /lang
parent1f05280ffab587e4b6302ae99a6bcf5d91dbb4bc (diff)
downloadpkgsrc-98196bcc44d4a230ceaf4da519191df61ec8d425.tar.gz
Fix tcl/tk configure script stupidity: it overwrote the value of LDFLAGS
that accumulates within itself with a do-nothing version because it tried to re-use LDFLAGS for another purpose. This broke all library checks after the "checking for ELF" step. Fix this by (duh) not re-using LDFLAGS but by using a different variable. Bump the PKGREVISIONs of lang/tcl and x11/tk. This fixes building the threaded versions of tcl and tk.
Diffstat (limited to 'lang')
-rw-r--r--lang/tcl/Makefile10
-rw-r--r--lang/tcl/distinfo9
-rw-r--r--lang/tcl/patches/patch-aa18
-rw-r--r--lang/tcl/patches/patch-ab400
-rw-r--r--lang/tcl/patches/patch-af409
-rw-r--r--lang/tcl/patches/patch-ag13
6 files changed, 822 insertions, 37 deletions
diff --git a/lang/tcl/Makefile b/lang/tcl/Makefile
index 9e359320c26..40a74c0726d 100644
--- a/lang/tcl/Makefile
+++ b/lang/tcl/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.29 2004/03/24 15:24:36 jwise Exp $
+# $NetBSD: Makefile,v 1.30 2004/03/25 22:49:14 jlam Exp $
#
DISTNAME= tcl8.4.6-src
PKGNAME= tcl-8.4.6
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tcl/}
@@ -30,7 +30,8 @@ PLIST_SUBST+= SHLIB_SUFX="${SHLIB_SUFX}"
# Initially install the man pages into ${WRKDIR}/man, as we need a staged
# install to avoid overwriting existing manpages in ${PREFIX}/man.
#
-CONFIGURE_ARGS+= --mandir=${WRKDIR}/man --enable-threads
+CONFIGURE_ARGS+= --mandir=${WRKDIR}/man
+CONFIGURE_ARGS+= --enable-threads
# Add ${VIEWBASE}/lib/tcl to the list of locations for Tcl packages.
CONFIGURE_ENV+= TCL_PACKAGE_PATH="${VIEWBASE}/lib/tcl"
@@ -52,6 +53,8 @@ SHLIB_SUFX= la
CONFIGURE_ENV+= COMPILER_OPTIMIZATION_BUG=YES
.endif
+.include "../../mk/pthread.buildlink3.mk"
+
# Modify mkLinks script to remove the short-filename manpage if it was
# linked to a longer filename.
#
@@ -96,5 +99,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/../generic/tclPort.h ${PREFIX}/include/tcl/generic
${INSTALL_DATA} ${WRKSRC}/../generic/tclRegexp.h ${PREFIX}/include/tcl/generic
-.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/tcl/distinfo b/lang/tcl/distinfo
index a075faa871c..dca56649e64 100644
--- a/lang/tcl/distinfo
+++ b/lang/tcl/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.20 2004/03/08 22:14:19 minskim Exp $
+$NetBSD: distinfo,v 1.21 2004/03/25 22:49:14 jlam Exp $
SHA1 (tcl8.4.6-src.tar.gz) = d21495ca04419fc3b1594b96b19116040c33a3f0
Size (tcl8.4.6-src.tar.gz) = 3448711 bytes
-SHA1 (patch-aa) = 7615c4debc2ff76278b071d649695e1da9e5decd
-SHA1 (patch-ab) = dc45c2d9195aec8047ca132adab94e25c777931c
+SHA1 (patch-aa) = 5a8d4d6a14c3520cb9f46e65d826ee85f48b2c5b
+SHA1 (patch-ab) = 3032c2b97e69260827f9fec27553557572b9bdb4
SHA1 (patch-ac) = efc40f45f73cec2770231ff515314fc41bbd166e
SHA1 (patch-ae) = 9a6f9b47c926f851a799ece713668f0955344ce3
-SHA1 (patch-af) = b19b6df12335c89d7786c91a36460249a44c7fcf
+SHA1 (patch-af) = 164fa9ee7fe4baa9b3f3a13716aefbf415e3be0a
+SHA1 (patch-ag) = d1b038f6006ef3611fec9d8cef314f8959a5cd08
diff --git a/lang/tcl/patches/patch-aa b/lang/tcl/patches/patch-aa
index 3db196b92b4..5b1ac97e161 100644
--- a/lang/tcl/patches/patch-aa
+++ b/lang/tcl/patches/patch-aa
@@ -1,16 +1,16 @@
-$NetBSD: patch-aa,v 1.9 2004/03/08 19:55:35 minskim Exp $
+$NetBSD: patch-aa,v 1.10 2004/03/25 22:49:14 jlam Exp $
---- Makefile.in.orig 2003-11-21 14:17:14.000000000 -0600
+--- Makefile.in.orig Mon Mar 1 18:58:59 2004
+++ Makefile.in
-@@ -90,7 +90,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
- #CFLAGS = $(CFLAGS_DEBUG)
- #CFLAGS = $(CFLAGS_OPTIMIZE)
- #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
--CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DTCL_DBGX=$(TCL_DBGX)
-+CFLAGS += @CFLAGS@ @CFLAGS_DEFAULT@ -DTCL_DBGX=$(TCL_DBGX)
-
+@@ -95,7 +95,7 @@ CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DT
# Flags to pass to the linker
LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
+ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
+-LDFLAGS = @LDFLAGS@ @LDFLAGS_DEFAULT@
++LDFLAGS = @LD_FLAGS@ @LDFLAGS@ @LDFLAGS_DEFAULT@
+
+ # To disable ANSI-C procedure prototypes reverse the comment characters
+ # on the following lines:
@@ -172,8 +172,8 @@ SHELL = /bin/sh
INSTALL_STRIP_PROGRAM = -s
INSTALL_STRIP_LIBRARY = -S -S
diff --git a/lang/tcl/patches/patch-ab b/lang/tcl/patches/patch-ab
index 9cf7af11e08..d2c86a091ed 100644
--- a/lang/tcl/patches/patch-ab
+++ b/lang/tcl/patches/patch-ab
@@ -1,6 +1,6 @@
-$NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
+$NetBSD: patch-ab,v 1.24 2004/03/25 22:49:14 jlam Exp $
---- configure.orig 2004-03-01 17:58:59.000000000 -0600
+--- configure.orig Mon Mar 1 18:58:59 2004
+++ configure
@@ -5613,6 +5613,7 @@ fi
# Step 3: set configuration options based on system name and version.
@@ -10,19 +10,136 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
EXTRA_CFLAGS=""
TCL_EXPORT_FILE_SUFFIX=""
UNSHARED_LIB_SUFFIX=""
-@@ -6038,6 +6039,9 @@ fi
+@@ -5682,7 +5683,7 @@ fi
+ SHLIB_SUFFIX=".so"
+
+ DL_OBJS="tclLoadDl.o"
+- LDFLAGS=""
++ LD_FLAGS=""
+
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+@@ -5693,7 +5694,7 @@ fi
+ else
+ do64bit_ok=yes
+ EXTRA_CFLAGS="-q64"
+- LDFLAGS="-q64"
++ LD_FLAGS="-q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+@@ -5734,7 +5735,7 @@ fi
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+@@ -5754,7 +5755,7 @@ fi
+ else
+ do64bit_ok=yes
+ EXTRA_CFLAGS="-q64"
+- LDFLAGS="-q64"
++ LD_FLAGS="-q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+@@ -5830,7 +5831,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -5841,7 +5842,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS="-export-dynamic"
++ LD_FLAGS="-export-dynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -5852,7 +5853,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -5916,7 +5917,7 @@ fi
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+- LDFLAGS="-Wl,-E"
++ LD_FLAGS="-Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+@@ -5952,10 +5953,10 @@ fi
+ do64bit_ok=yes
+ if test "`uname -m`" = "ia64" ; then
+ EXTRA_CFLAGS="+DD64"
+- LDFLAGS="+DD64 $LDFLAGS"
++ LD_FLAGS="+DD64 $LD_FLAGS"
+ else
+ EXTRA_CFLAGS="+DA2.0W"
+- LDFLAGS="+DA2.0W $LDFLAGS"
++ LD_FLAGS="+DA2.0W $LD_FLAGS"
+ fi
+ fi
+ fi
+@@ -6009,7 +6010,7 @@ fi
+ SHLIB_LD_LIBS=""
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+- LDFLAGS="-Wl,-E"
++ LD_FLAGS="-Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+@@ -6022,7 +6023,7 @@ fi
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS="-Wl,-D,08000000"
++ LD_FLAGS="-Wl,-D,08000000"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
+@@ -6037,7 +6038,10 @@ fi
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
EXTRA_CFLAGS=""
- LDFLAGS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
IRIX-6.*)
SHLIB_CFLAGS=""
-@@ -6063,6 +6067,9 @@ fi
+@@ -6050,7 +6054,7 @@ fi
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ EXTRA_CFLAGS="-mabi=n32"
+- LDFLAGS="-mabi=n32"
++ LD_FLAGS="-mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+@@ -6061,8 +6065,11 @@ fi
+ EXTRA_CFLAGS="-n32"
+ ;;
esac
- LDFLAGS="-n32"
+- LDFLAGS="-n32"
++ LD_FLAGS="-n32"
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
@@ -30,8 +147,21 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
;;
IRIX64-6.*)
SHLIB_CFLAGS=""
-@@ -6087,6 +6094,9 @@ fi
- LDFLAGS="-64"
+@@ -6071,7 +6078,7 @@ fi
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+
+@@ -6084,9 +6091,12 @@ fi
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ EXTRA_CFLAGS="-64"
+- LDFLAGS="-64"
++ LD_FLAGS="-64"
fi
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
@@ -40,6 +170,24 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
;;
Linux*)
SHLIB_CFLAGS="-fPIC"
+@@ -6103,7 +6113,7 @@ fi
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS="-rdynamic"
++ LD_FLAGS="-rdynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ else
+@@ -6139,7 +6149,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
+ SHLIB_LD="ld -shared"
+ DL_OBJS="tclLoadDld.o"
+ DL_LIBS="-ldld"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ else
@@ -6168,6 +6178,9 @@ fi
EOF
@@ -50,7 +198,40 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
;;
GNU*)
SHLIB_CFLAGS="-fPIC"
-@@ -6249,6 +6262,9 @@ fi
+@@ -6178,7 +6191,7 @@ EOF
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+- LDFLAGS="-rdynamic"
++ LD_FLAGS="-rdynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ else
+@@ -6214,7 +6227,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
+ SHLIB_LD="ld -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldld"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ else
+@@ -6233,7 +6246,7 @@ fi
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -6244,11 +6257,14 @@ fi
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS="-Wl,-Bexport"
++ LD_FLAGS="-Wl,-Bexport"
+ CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
@@ -69,7 +250,8 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LDFLAGS=""
+- LDFLAGS=""
++ LD_FLAGS=""
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
@@ -104,6 +286,166 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
fi
+@@ -6323,7 +6346,7 @@ else
+ SHLIB_SUFFIX=".a"
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+@@ -6344,14 +6367,14 @@ fi
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS="-export-dynamic"
++ LD_FLAGS="-export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ EXTRA_CFLAGS="-pthread"
+- LDFLAGS="$LDFLAGS -pthread"
++ LD_FLAGS="$LD_FLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+@@ -6372,7 +6395,7 @@ fi
+ DL_OBJS="tclLoadDyld.o"
+ PLAT_OBJS="tclMacOSXBundle.o"
+ DL_LIBS=""
+- LDFLAGS="-prebind"
++ LD_FLAGS="-prebind"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ CFLAGS_OPTIMIZE="-Os"
+@@ -6389,7 +6412,7 @@ fi
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -6409,7 +6432,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadOSF.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -6425,7 +6448,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -6441,7 +6464,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+@@ -6458,7 +6481,7 @@ EOF
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
+- LDFLAGS="-pthread"
++ LD_FLAGS="-pthread"
+ fi
+ fi
+
+@@ -6473,7 +6496,7 @@ EOF
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -6484,7 +6507,7 @@ EOF
+ SHLIB_SUFFIX=".a"
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS="-Wl,-D,08000000"
++ LD_FLAGS="-Wl,-D,08000000"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ ;;
+@@ -6494,10 +6517,10 @@ EOF
+ # below.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+- LDFLAGS="-melf -Wl,-Bexport"
++ LD_FLAGS="-melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+- LDFLAGS="-belf -Wl,-Bexport"
++ LD_FLAGS="-belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+@@ -6514,7 +6537,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -6525,7 +6548,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+@@ -6561,7 +6584,7 @@ EOF
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+@@ -6587,7 +6610,7 @@ EOF
+
+
+ SHLIB_CFLAGS="-KPIC"
+- LDFLAGS=""
++ LD_FLAGS=""
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+@@ -6599,10 +6622,10 @@ EOF
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ EXTRA_CFLAGS="-xarch=v9a"
+- LDFLAGS="-xarch=v9a"
++ LD_FLAGS="-xarch=v9a"
+ else
+ EXTRA_CFLAGS="-xarch=v9"
+- LDFLAGS="-xarch=v9"
++ LD_FLAGS="-xarch=v9"
+ fi
+ fi
+ else
@@ -6626,6 +6649,9 @@ EOF
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
@@ -114,6 +456,36 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
;;
ULTRIX-4.*)
SHLIB_CFLAGS="-G 0"
+@@ -6634,7 +6660,7 @@ EOF
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS="-Wl,-D,08000000"
++ LD_FLAGS="-Wl,-D,08000000"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "$GCC" != "yes" ; then
+@@ -6675,9 +6701,9 @@ rm -f conftest*
+ LDFLAGS=$hold_ldflags
+ echo "$ac_t""$found" 1>&6
+ if test $found = yes; then
+- LDFLAGS="-Wl,-Bexport"
++ LD_FLAGS="-Wl,-Bexport"
+ else
+- LDFLAGS=""
++ LD_FLAGS=""
+ fi
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+@@ -6852,7 +6878,7 @@ fi
+ SHLIB_SUFFIX=""
+ DL_OBJS="tclLoadNone.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ BUILD_DLTEST=""
@@ -6897,8 +6923,8 @@ fi
if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
@@ -171,3 +543,11 @@ $NetBSD: patch-ab,v 1.23 2004/03/08 22:14:19 minskim Exp $
#--------------------------------------------------------------------
# The statements below define various symbols relating to Tcl
# stub support.
+@@ -7487,6 +7519,7 @@ s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
+ s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
+ s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
+ s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
++s%@LD_FLAGS@%$LD_FLAGS%g
+ s%@STLIB_LD@%$STLIB_LD%g
+ s%@SHLIB_LD@%$SHLIB_LD%g
+ s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g
diff --git a/lang/tcl/patches/patch-af b/lang/tcl/patches/patch-af
index cf6038f0b3a..30bc1088630 100644
--- a/lang/tcl/patches/patch-af
+++ b/lang/tcl/patches/patch-af
@@ -1,7 +1,16 @@
-$NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
+$NetBSD: patch-af,v 1.11 2004/03/25 22:49:15 jlam Exp $
---- tcl.m4.orig 2004-03-01 17:58:59.000000000 -0600
+--- tcl.m4.orig Mon Mar 1 18:58:59 2004
+++ tcl.m4
+@@ -651,7 +651,7 @@ AC_DEFUN(SC_CONFIG_MANPAGES, [
+ # loading for Tcl on this system.
+ # DL_LIBS - Library file(s) to include in tclsh and other base
+ # applications in order for the "load" command to work.
+-# LDFLAGS - Flags to pass to the compiler when linking object
++# LD_FLAGS - Flags to pass to the compiler when linking object
+ # files into an executable application binary such
+ # as tclsh.
+ # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
@@ -796,6 +796,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# Step 3: set configuration options based on system name and version.
@@ -10,19 +19,136 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
EXTRA_CFLAGS=""
TCL_EXPORT_FILE_SUFFIX=""
UNSHARED_LIB_SUFFIX=""
-@@ -1066,6 +1067,9 @@ dnl AC_CHECK_TOOL(AR, ar)
+@@ -839,7 +840,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+
+ DL_OBJS="tclLoadDl.o"
+- LDFLAGS=""
++ LD_FLAGS=""
+
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+@@ -850,7 +851,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ else
+ do64bit_ok=yes
+ EXTRA_CFLAGS="-q64"
+- LDFLAGS="-q64"
++ LD_FLAGS="-q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+@@ -891,7 +892,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+@@ -911,7 +912,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ else
+ do64bit_ok=yes
+ EXTRA_CFLAGS="-q64"
+- LDFLAGS="-q64"
++ LD_FLAGS="-q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+@@ -944,7 +945,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -955,7 +956,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS="-export-dynamic"
++ LD_FLAGS="-export-dynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -966,7 +967,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -984,7 +985,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+- LDFLAGS="-Wl,-E"
++ LD_FLAGS="-Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+@@ -1020,10 +1021,10 @@ dnl AC_CHECK_TOOL(AR, ar)
+ do64bit_ok=yes
+ if test "`uname -m`" = "ia64" ; then
+ EXTRA_CFLAGS="+DD64"
+- LDFLAGS="+DD64 $LDFLAGS"
++ LD_FLAGS="+DD64 $LD_FLAGS"
+ else
+ EXTRA_CFLAGS="+DA2.0W"
+- LDFLAGS="+DA2.0W $LDFLAGS"
++ LD_FLAGS="+DA2.0W $LD_FLAGS"
+ fi
+ fi
+ fi
+@@ -1037,7 +1038,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD_LIBS=""
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+- LDFLAGS="-Wl,-E"
++ LD_FLAGS="-Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+@@ -1050,7 +1051,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS="-Wl,-D,08000000"
++ LD_FLAGS="-Wl,-D,08000000"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
+@@ -1065,7 +1066,10 @@ dnl AC_CHECK_TOOL(AR, ar)
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
EXTRA_CFLAGS=""
- LDFLAGS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
IRIX-6.*)
SHLIB_CFLAGS=""
-@@ -1091,6 +1095,9 @@ dnl AC_CHECK_TOOL(AR, ar)
+@@ -1078,7 +1082,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ EXTRA_CFLAGS="-mabi=n32"
+- LDFLAGS="-mabi=n32"
++ LD_FLAGS="-mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+@@ -1089,8 +1093,11 @@ dnl AC_CHECK_TOOL(AR, ar)
+ EXTRA_CFLAGS="-n32"
+ ;;
esac
- LDFLAGS="-n32"
+- LDFLAGS="-n32"
++ LD_FLAGS="-n32"
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
@@ -30,8 +156,21 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
;;
IRIX64-6.*)
SHLIB_CFLAGS=""
-@@ -1115,6 +1122,9 @@ dnl AC_CHECK_TOOL(AR, ar)
- LDFLAGS="-64"
+@@ -1099,7 +1106,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+
+@@ -1112,9 +1119,12 @@ dnl AC_CHECK_TOOL(AR, ar)
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ EXTRA_CFLAGS="-64"
+- LDFLAGS="-64"
++ LD_FLAGS="-64"
fi
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
@@ -40,6 +179,24 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
;;
Linux*)
SHLIB_CFLAGS="-fPIC"
+@@ -1131,7 +1141,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS="-rdynamic"
++ LD_FLAGS="-rdynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ else
+@@ -1139,7 +1149,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD="ld -shared"
+ DL_OBJS="tclLoadDld.o"
+ DL_LIBS="-ldld"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""])
+ fi
@@ -1161,6 +1171,9 @@ dnl AC_CHECK_TOOL(AR, ar)
# XIM peeking works under XFree86.
AC_DEFINE(PEEK_XCLOSEIM)
@@ -50,7 +207,40 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
;;
GNU*)
SHLIB_CFLAGS="-fPIC"
-@@ -1210,29 +1223,37 @@ dnl AC_CHECK_TOOL(AR, ar)
+@@ -1171,7 +1184,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+- LDFLAGS="-rdynamic"
++ LD_FLAGS="-rdynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ else
+@@ -1179,7 +1192,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD="ld -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldld"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""])
+ fi
+@@ -1194,7 +1207,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -1205,34 +1218,42 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS="-Wl,-Bexport"
++ LD_FLAGS="-Wl,-Bexport"
+ CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*)
@@ -66,7 +256,8 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LDFLAGS=""
+- LDFLAGS=""
++ LD_FLAGS=""
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
AC_MSG_CHECKING(for ELF)
@@ -93,6 +284,166 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
], [
SHLIB_CFLAGS=""
SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
+@@ -1240,7 +1261,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".a"
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+@@ -1259,14 +1280,14 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS="-export-dynamic"
++ LD_FLAGS="-export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ EXTRA_CFLAGS="-pthread"
+- LDFLAGS="$LDFLAGS -pthread"
++ LD_FLAGS="$LD_FLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+@@ -1287,7 +1308,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ DL_OBJS="tclLoadDyld.o"
+ PLAT_OBJS="tclMacOSXBundle.o"
+ DL_LIBS=""
+- LDFLAGS="-prebind"
++ LD_FLAGS="-prebind"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ CFLAGS_OPTIMIZE="-Os"
+@@ -1304,7 +1325,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -1321,7 +1342,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadOSF.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -1337,7 +1358,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -1353,7 +1374,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+@@ -1370,7 +1391,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
+- LDFLAGS="-pthread"
++ LD_FLAGS="-pthread"
+ fi
+ fi
+
+@@ -1385,7 +1406,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -1396,7 +1417,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".a"
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS="-Wl,-D,08000000"
++ LD_FLAGS="-Wl,-D,08000000"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ ;;
+@@ -1406,10 +1427,10 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # below.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+- LDFLAGS="-melf -Wl,-Bexport"
++ LD_FLAGS="-melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+- LDFLAGS="-belf -Wl,-Bexport"
++ LD_FLAGS="-belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+@@ -1426,7 +1447,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+@@ -1437,7 +1458,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+@@ -1467,7 +1488,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+- LDFLAGS=""
++ LD_FLAGS=""
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+@@ -1487,7 +1508,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+
+ SHLIB_CFLAGS="-KPIC"
+- LDFLAGS=""
++ LD_FLAGS=""
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+@@ -1499,10 +1520,10 @@ dnl AC_CHECK_TOOL(AR, ar)
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ EXTRA_CFLAGS="-xarch=v9a"
+- LDFLAGS="-xarch=v9a"
++ LD_FLAGS="-xarch=v9a"
+ else
+ EXTRA_CFLAGS="-xarch=v9"
+- LDFLAGS="-xarch=v9"
++ LD_FLAGS="-xarch=v9"
+ fi
+ fi
+ else
@@ -1526,6 +1547,9 @@ dnl AC_CHECK_TOOL(AR, ar)
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
@@ -103,6 +454,36 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
;;
ULTRIX-4.*)
SHLIB_CFLAGS="-G 0"
+@@ -1534,7 +1558,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadAout.o"
+ DL_LIBS=""
+- LDFLAGS="-Wl,-D,08000000"
++ LD_FLAGS="-Wl,-D,08000000"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "$GCC" != "yes" ; then
+@@ -1557,9 +1581,9 @@ dnl AC_CHECK_TOOL(AR, ar)
+ LDFLAGS=$hold_ldflags
+ AC_MSG_RESULT($found)
+ if test $found = yes; then
+- LDFLAGS="-Wl,-Bexport"
++ LD_FLAGS="-Wl,-Bexport"
+ else
+- LDFLAGS=""
++ LD_FLAGS=""
+ fi
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+@@ -1665,7 +1689,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_SUFFIX=""
+ DL_OBJS="tclLoadNone.o"
+ DL_LIBS=""
+- LDFLAGS=""
++ LD_FLAGS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ BUILD_DLTEST=""
@@ -1710,8 +1734,8 @@ dnl AC_CHECK_TOOL(AR, ar)
if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
@@ -127,3 +508,11 @@ $NetBSD: patch-af,v 1.10 2004/03/08 22:14:19 minskim Exp $
INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
fi
+@@ -1762,6 +1786,7 @@ dnl esac
+ AC_SUBST(LDFLAGS)
+ AC_SUBST(LDFLAGS_DEBUG)
+ AC_SUBST(LDFLAGS_OPTIMIZE)
++ AC_SUBST(LD_FLAGS)
+ AC_SUBST(CC_SEARCH_FLAGS)
+ AC_SUBST(LD_SEARCH_FLAGS)
+
diff --git a/lang/tcl/patches/patch-ag b/lang/tcl/patches/patch-ag
new file mode 100644
index 00000000000..3e3753fc43c
--- /dev/null
+++ b/lang/tcl/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1 2004/03/25 22:49:15 jlam Exp $
+
+--- tclConfig.sh.in.orig Mon Mar 1 18:58:59 2004
++++ tclConfig.sh.in
+@@ -90,7 +90,7 @@ TCL_DL_LIBS='@DL_LIBS@'
+
+ # Flags to pass to the compiler when linking object files into
+ # an executable tclsh or tcltest binary.
+-TCL_LD_FLAGS='@LDFLAGS@'
++TCL_LD_FLAGS='@LD_FLAGS@'
+
+ # Flags to pass to ld, such as "-R /usr/local/tcl/lib", that tell the
+ # run-time dynamic linker where to look for shared libraries such as