]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* doc/notes.texi: Mention MACOSX_DEPLOYMENT_TARGET issue.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 24 Feb 2007 08:46:19 +0000 (08:46 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 24 Feb 2007 08:46:19 +0000 (08:46 +0000)
* tests/template.at: Only skip those tests failing on Darwin
if `-flat_namespace' is used by libtool.  In that case, SKIP
at the end.  Analysis by Peter O'Gorman.

ChangeLog
doc/notes.texi
tests/template.at

index 3dcbed02b0309ab590b704229a6d551d65c2b104..b10202205e365d1315c88300f5231955a3d565be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * doc/notes.texi: Mention MACOSX_DEPLOYMENT_TARGET issue.
+       * tests/template.at: Only skip those tests failing on Darwin
+       if `-flat_namespace' is used by libtool.  In that case, SKIP
+       at the end.  Analysis by Peter O'Gorman.
+
 2007-02-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Fix -export-symbols and -export-symbols-regex for links that
@@ -8,6 +15,7 @@
        linker script nor a linker input file if no objects are passed.
        Apply export_symbols_regex in case the command line length is
        exceeded.
+       Report by Bob Friesenhahn.
 
        * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
        <compiler_needs_object>: New tag variable.  Default to `no'.
index 2090b90d0a2c5a657b2af15b80f1a4f0df8d5f03..ec2058261afeeb6c03cd35d7c31209a2c782495e 100644 (file)
@@ -10,6 +10,12 @@ For C++ code with templates, it may be necessary to specify the way the compiler
 will generate the instantiations.  For Portland pgCC version5, use
 @code{CXX='pgCC --one_instantiation_per_object'} and avoid parallel @command{make}.
 
+@item
+On Darwin, for C++ code with templates you need two level shared libraries.
+Libtool builds these by default if @env{MACOSX_DEPLOYMENT_TARGET} is set to
+10.3 or later at @command{configure} time.  See @url{rdar://problem/4135857}
+for more information on this issue.
+
 @item
 FreeBSD @command{make} does not conform to @sc{posix} in its handling
 of file modification times, which causes it to loop while building libtool.
index 25cad916805bdbff826ddb885edd5c4055697a00..f63589ef5fb0c400d448267239cee3ab0ee9f59e 100644 (file)
@@ -122,6 +122,16 @@ AT_CLEANUP
 AT_SETUP([template test with subdirs])
 LT_AT_TAG([CXX])
 AT_KEYWORDS([libtool])
+
+# This does not work with flat namespace shared libraries on Darwin.
+# Set MACOSX_DEPLOYMENT_TARGET to 10.3 or later at configure time to 
+# get two-level namespace shared libraries.
+noskip=:
+eval `$LIBTOOL --tag=CXX --config | grep '^allow_undefined_flag='`
+case $allow_undefined_flag in
+*-flat_namespace*) noskip=false ;;
+esac
+
 CPPFLAGS="$CPPFLAGS -I../src/lib -I../src/lib2"
 
 mkdir src obj
@@ -229,15 +239,14 @@ AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $ma
         [0], [ignore], [ignore])
 LT_AT_EXEC_CHECK([./sub/main], [ignore])
 # lib convenience
-case $host in
-  *-*-darwin*) ;;
-  *)   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo],
-                [0], [ignore], [ignore])
-       AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la],
-                [0], [ignore], [ignore])
-       LT_AT_EXEC_CHECK([./sub/main])
-       ;;
-esac
+if $noskip; then
+  AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo],
+          [0], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la],
+          [0], [ignore], [ignore])
+  LT_AT_EXEC_CHECK([./sub/main])
+fi
+
 # both installed
 AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo],
         [0], [ignore], [ignore])
@@ -255,28 +264,27 @@ AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $ma
         [0], [ignore], [ignore])
 LT_AT_EXEC_CHECK([./sub/main])
 # lib convenience
-case $host in
-  *-*-darwin*) ;;
-  *)   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo],
-                [0], [ignore], [ignore])
-       AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la],
-                [0], [ignore], [ignore])
-       LT_AT_EXEC_CHECK([./sub/main])
-       ;;
-esac
+if $noskip; then
+
+  AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo],
+        [0], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la],
+        [0], [ignore], [ignore])
+  LT_AT_EXEC_CHECK([./sub/main])
+fi
 # both installed
-case $host in
-  *-*-darwin*) ;;
-  *)   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar],
-                [0], [ignore], [ignore])
-       AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la],
-                [0], [ignore], [ignore])
-       LT_AT_EXEC_CHECK([./sub/main])
-       ;;
-esac
+if $noskip; then
+  AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar],
+        [0], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la],
+        [0], [ignore], [ignore])
+  LT_AT_EXEC_CHECK([./sub/main])
+fi
 
 cd ..
 
+AT_CHECK([$noskip || (exit 77)])
+
 dnl with autoreconf use:
 dnl
 dnl AT_DATA(src/configure.ac,