summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--generic/tclInt.h27
-rwxr-xr-xunix/configure2
-rw-r--r--unix/tcl.m42
4 files changed, 40 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 04993da..cd2dae3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-06-18 Daniel Steffen <das@users.sourceforge.net>
+
+ * generic/tclInt.h: ensure WORDS_BIGENDIAN is defined correctly with fat
+ compiles on Darwin (i.e. ppc and i386 at the same time), the configure
+ AC_C_BIGENDIAN check is not sufficient in this case because a single run
+ of the compiler builds for two architectures with different endianness.
+
+ * unix/tcl.m4 (Darwin): add -headerpad_max_install_names to LDFLAGS to
+ ensure we can always relocate binaries with install_name_tool.
+
+ * unix/configure: autoconf-2.59
+
2005-06-18 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* generic/tclCmdAH.c (Tcl_FormatObjCmd): Fix for [Bug 1154163]; only
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 1c6f1f5..db8591b 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.235 2005/06/07 21:46:08 dgp Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.236 2005/06/18 21:45:02 das Exp $
*/
#ifndef _TCLINT
@@ -60,6 +60,31 @@ typedef int ptrdiff_t;
#endif
/*
+ * Ensure WORDS_BIGENDIAN is defined correcly:
+ * Needs to happen here in addition to configure to work with
+ * fat compiles on Darwin (i.e. ppc and i386 at the same time).
+ */
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#ifdef BYTE_ORDER
+# ifdef BIG_ENDIAN
+# if BYTE_ORDER == BIG_ENDIAN
+# define WORDS_BIGENDIAN
+# endif
+# endif
+# ifdef LITTLE_ENDIAN
+# if BYTE_ORDER == LITTLE_ENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+# endif
+#endif
+
+/*
* Used to tag functions that are only to be visible within the module
* being built and not outside it (where this is supported by the
* linker).
diff --git a/unix/configure b/unix/configure
index fce0669..af546e1 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7857,7 +7857,7 @@ echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
SHLIB_SUFFIX=".dylib"
DL_OBJS="tclLoadDyld.o"
DL_LIBS=""
- LDFLAGS="$LDFLAGS -prebind"
+ LDFLAGS="$LDFLAGS -prebind -headerpad_max_install_names"
echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
if test "${tcl_cv_ld_search_paths_first+set}" = set; then
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 1402309..74c181b 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1423,7 +1423,7 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".dylib"
DL_OBJS="tclLoadDyld.o"
DL_LIBS=""
- LDFLAGS="$LDFLAGS -prebind"
+ LDFLAGS="$LDFLAGS -prebind -headerpad_max_install_names"
AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"