From f9864f346be2acee6721e241f42b7840bbec9c3e Mon Sep 17 00:00:00 2001 From: das Date: Sat, 18 Jun 2005 21:46:40 +0000 Subject: *** 8.4.11 TAGGED FOR RELEASE *** * 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.13 --- ChangeLog | 14 ++++++++++++++ generic/tclInt.h | 27 ++++++++++++++++++++++++++- unix/configure | 2 +- unix/tcl.m4 | 2 +- 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dca7618..9bf583b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-06-18 Daniel Steffen + + *** 8.4.11 TAGGED FOR RELEASE *** + + * 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.13 + 2005-06-18 Don Porter *** 8.4.11 TAGGED FOR RELEASE *** diff --git a/generic/tclInt.h b/generic/tclInt.h index 7f555ec..2716467 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.118.2.10 2005/05/24 04:19:33 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.118.2.11 2005/06/18 21:46:42 das Exp $ */ #ifndef _TCLINT @@ -51,6 +51,31 @@ #include #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 +#endif +#ifdef HAVE_SYS_PARAM_H +# include +#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 + #undef TCL_STORAGE_CLASS #ifdef BUILD_tcl # define TCL_STORAGE_CLASS DLLEXPORT diff --git a/unix/configure b/unix/configure index 89b4116..add3aff 100755 --- a/unix/configure +++ b/unix/configure @@ -3047,7 +3047,7 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - LDFLAGS="$LDFLAGS -prebind" + LDFLAGS="$LDFLAGS -prebind -headerpad_max_install_names" echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6 echo "configure:3053: checking if ld accepts -search_paths_first flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then diff --git a/unix/tcl.m4 b/unix/tcl.m4 index fc91c3d..4749011 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1377,7 +1377,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" -- cgit v0.12