From 989c4417a160ebc78ea75f261c47a01072d81d8e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 21 Apr 2007 00:56:47 +0000 Subject: [PATCH] Fixes trac:982. Thank God for google-able mailing list archives: http://www.mail-archive.com/bug-libtool@gnu.org/msg00899.html We ran into this exact bug in Libtool that was causing the C++ bindings library to be compiled incorrectly (therefore causing static initializers to not fire properly when in a shared library, which is the default installation configuration). Putting in some libtool patches to fix the problem -- will be mailing the Libtool crowd shortly to ask for a better fix... This commit was SVN r14454. The following Trac tickets were found above: Ticket 982 --> https://svn.open-mpi.org/trac/ompi/ticket/982 --- autogen.sh | 14 ++++++++++++++ config/lt1522-pathCC.diff | 11 +++++++++++ config/lt21a-pathCC.diff | 11 +++++++++++ 3 files changed, 36 insertions(+) create mode 100644 config/lt1522-pathCC.diff create mode 100644 config/lt21a-pathCC.diff diff --git a/autogen.sh b/autogen.sh index 124955ea7b..29323a7edf 100755 --- a/autogen.sh +++ b/autogen.sh @@ -10,6 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. +# Copyright (c) 2007 Cisco, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -391,6 +392,19 @@ EOF "`grep AM_CONFIG_HEADER $file`" != ""; then run_and_check $ompi_autoheader fi + + # We only need to patch the top-level aclocal.m4 for libtool stuff + # because this only affects creating C++ libraries (with pathCC). + # This must be done before we run autoconf. + + if test -f $topdir_file; then + echo "Adjusting libtool for OMPI :-(" + echo " -- patching for pathscale multi-line output (LT 1.5.22)" + patch -N -p0 < config/lt1522-pathCC.diff > /dev/null 2>&1 + echo " -- patching for pathscale multi-line output (LT 2.1a)" + patch -N -p0 < config/lt21a-pathCC.diff > /dev/null 2>&1 + fi + run_and_check $ompi_autoconf # We only need the libltdl stuff for the top-level diff --git a/config/lt1522-pathCC.diff b/config/lt1522-pathCC.diff new file mode 100644 index 0000000000..b28e2295fe --- /dev/null +++ b/config/lt1522-pathCC.diff @@ -0,0 +1,11 @@ +--- aclocal.m4.old 2007-04-20 14:54:50.000000000 -0700 ++++ aclocal.m4 2007-04-20 13:03:19.000000000 -0700 +@@ -2855,7 +2855,7 @@ + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. +- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L" | tail -n 1' + + else + GXX=no diff --git a/config/lt21a-pathCC.diff b/config/lt21a-pathCC.diff new file mode 100644 index 0000000000..daa6db1dd2 --- /dev/null +++ b/config/lt21a-pathCC.diff @@ -0,0 +1,11 @@ +--- aclocal.m4.old 2007-04-20 15:18:48.000000000 -0700 ++++ aclocal.m4 2007-04-20 15:18:59.000000000 -0700 +@@ -5311,7 +5311,7 @@ + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. +- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L" | tail -n 1' + + else + GXX=no