Branch: Tag:

2008-08-19

2008-08-19 11:51:08 by 0

Enable two-level namespace in OS X linker (10.3 or newer) to avoid crashes
caused by multiply defined library symbols.

Rev: bin/smartlink:1.31
Rev: src/acconfig.h:1.159
Rev: src/configure.in:1.1069
Rev: src/smartlink.c:1.21

1: - AC_REVISION("$Id: configure.in,v 1.1068 2008/08/15 12:59:51 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.1069 2008/08/19 11:51:07 jonasw Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
841:    ;;   esac    + # Smartlink needs to know if OS X uses flat or two-level namespace + if test "$pike_cv_sys_os" = "Darwin" ; then +  AC_MSG_CHECKING([for Darwin linker namespace]) +  case "`uname -r`" in +  [1-6].*) +  AC_MSG_RESULT([flat (10.2 or older)]) +  pike_cv_osx_twolevel_namespace=no +  ;; +  *) +  AC_DEFINE(USE_OSX_TWOLEVEL_NAMESPACE) +  AC_MSG_RESULT([two-level (10.3 or newer)]) +  pike_cv_osx_twolevel_namespace=yes +  ;; +  esac + fi    -  +    # Fix a smartlink   SMARTLINK="$BUILDDIR/smartlink"   
2394:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1068 2008/08/15 12:59:51 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.1069 2008/08/19 11:51:07 jonasw Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2432:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1068 2008/08/15 12:59:51 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.1069 2008/08/19 11:51:07 jonasw Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2441:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1068 2008/08/15 12:59:51 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.1069 2008/08/19 11:51:07 jonasw Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF
7612:    fi    ;;    Darwin*) +  if test "$pike_cv_osx_twolevel_namespace" = yes ; then +  # 10.3 or newer take advantage of two-level namespaces to avoid +  # symbol collisions for e.g. libjpeg which is referenced from both +  # _Image_JPEG and _Image_TIFF. It requires MACOSX_DEPLOYMENT_TARGET +  # which is initialized in smartlink to 10.3. +  LDSHARED="$REALCC $CFLAGS -bundle -bind_at_load -undefined dynamic_lookup" +  else +  # Mac OS X prior to 10.3 need -flat_namespace to support dynamic modules    LDSHARED="$REALCC $CFLAGS -bundle -bind_at_load -flat_namespace -undefined suppress" -  +  fi    ;;    IRIX*)    if test "$GCC" = yes ; then