From 1cba10e11b067465240afd81e736076e869e374d Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 27 May 2008 21:58:09 +0000 Subject: [PATCH] Per advice from Ralf W. (see bug-libtool list post 4:48pm US Eastern time, 27 May 2008 -- not web archived as of this commit), do the following: * move libtoolize earlier in the process * remove most of acinclude.m4; instead, use "aclocal -I config" at the top-level to have it automatically pull in any relevant .m4 file * add patch for ifort shared library support for LT 2.2.4 (http://lists.gnu.org/archive/html/bug-libtool/2008-05/msg00049.html); will likely be unnecessary in future LT versions This commit was SVN r18515. --- acinclude.m4 | 94 +---------------------------------- autogen.sh | 111 +++++++++++++++++++++++++----------------- config/lt224-icc.diff | 20 ++++++++ 3 files changed, 88 insertions(+), 137 deletions(-) create mode 100644 config/lt224-icc.diff diff --git a/acinclude.m4 b/acinclude.m4 index 457e9b3e96..6cbb7ad852 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. -dnl Copyright (c) 2006-2007 Cisco Systems, Inc. +dnl Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights dnl reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. @@ -21,94 +21,7 @@ dnl dnl $HEADER$ dnl - -# -# Open MPI-specific tests -# - -m4_include(config/c_get_alignment.m4) -m4_include(config/c_weak_symbols.m4) - -m4_include(config/cxx_find_template_parameters.m4) -m4_include(config/cxx_find_template_repository.m4) -m4_include(config/cxx_have_exceptions.m4) -m4_include(config/cxx_find_exception_flags.m4) - -m4_include(config/f77_check.m4) -m4_include(config/f77_check_type.m4) -m4_include(config/f77_find_ext_symbol_convention.m4) -m4_include(config/f77_get_alignment.m4) -m4_include(config/f77_get_fortran_handle_max.m4) -m4_include(config/f77_get_sizeof.m4) -m4_include(config/f77_get_value_true.m4) -m4_include(config/f77_check_logical_array.m4) -m4_include(config/f77_purge_unsupported_kind.m4) - -m4_include(config/f90_check.m4) -m4_include(config/f90_check_type.m4) -m4_include(config/f90_find_module_include_flag.m4) -m4_include(config/f90_get_precision.m4) -m4_include(config/f90_get_range.m4) -m4_include(config/f90_get_sizeof.m4) -m4_include(config/f90_get_int_kind.m4) - -m4_include(config/ompi_try_assemble.m4) -m4_include(config/ompi_config_asm.m4) - -m4_include(config/ompi_case_sensitive_fs_setup.m4) -m4_include(config/ompi_check_broken_qsort.m4) -m4_include(config/ompi_check_compiler_works.m4) -m4_include(config/ompi_check_ident.m4) -m4_include(config/ompi_check_func_lib.m4) -m4_include(config/ompi_check_optflags.m4) -m4_include(config/ompi_check_attributes.m4) -m4_include(config/ompi_check_visibility.m4) -m4_include(config/ompi_check_icc.m4) -m4_include(config/ompi_check_gm.m4) -m4_include(config/ompi_check_mx.m4) -m4_include(config/ompi_check_alps.m4) -m4_include(config/ompi_check_lsf.m4) -m4_include(config/ompi_check_openib.m4) -m4_include(config/ompi_check_portals.m4) -m4_include(config/ompi_check_psm.m4) -m4_include(config/ompi_check_udapl.m4) -m4_include(config/ompi_check_package.m4) -m4_include(config/ompi_check_loadleveler.m4) -m4_include(config/ompi_check_sge.m4) -m4_include(config/ompi_check_slurm.m4) -m4_include(config/ompi_check_tm.m4) -m4_include(config/ompi_check_xgrid.m4) -m4_include(config/ompi_check_vendor.m4) -m4_include(config/ompi_config_subdir.m4) -m4_include(config/ompi_config_subdir_args.m4) -m4_include(config/ompi_configure_options.m4) -m4_include(config/ompi_contrib.m4) -m4_include(config/ompi_find_type.m4) -m4_include(config/ompi_functions.m4) m4_include(config/ompi_get_version.m4) -m4_include(config/ompi_get_libtool_linker_flags.m4) -m4_include(config/ompi_load_platform.m4) -m4_include(config/ompi_mca.m4) -m4_include(config/ompi_setup_cc.m4) -m4_include(config/ompi_setup_cxx.m4) -m4_include(config/ompi_setup_f77.m4) -m4_include(config/ompi_setup_f90.m4) -m4_include(config/ompi_setup_libevent.m4) -m4_include(config/ompi_setup_wrappers.m4) -m4_include(config/ompi_make_stripped_flags.m4) -m4_include(config/ompi_save_version.m4) - -m4_include(config/ompi_check_pthread_pids.m4) -m4_include(config/ompi_config_pthreads.m4) -m4_include(config/ompi_config_solaris_threads.m4) -m4_include(config/ompi_config_threads.m4) -m4_include(config/ompi_lang_link_with_c.m4) - -# -# Include the macros for Windows checking -# -m4_include(config/ompi_microsoft.m4) -m4_include(config/ompi_interix.m4) # # The config/mca_no_configure_components.m4 file is generated by @@ -121,8 +34,3 @@ m4_include(config/mca_no_configure_components.m4) # the list of all component configure.m4 macros. # m4_include(config/mca_m4_config_include.m4) - -# -# Check for ps commands and arguments -# -m4_include(config/ompi_check_ps.m4) diff --git a/autogen.sh b/autogen.sh index 1750e098f4..9184e1a515 100755 --- a/autogen.sh +++ b/autogen.sh @@ -10,7 +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 (c) 2007-2008 Cisco, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -391,49 +391,6 @@ EOF cd .. fi - run_and_check $ompi_aclocal - if test "`grep AC_CONFIG_HEADER $file`" != "" -o \ - "`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 :-(" - if ! check_version "2.0.0" $ompi_libtoolize_found_version ; then - echo " ++ patching for pathscale multi-line output (LT 1.5.x)" - patch -N -p0 < config/lt1522-pathCC.diff > /dev/null 2>&1 - else - echo " ++ patching for pathscale multi-line output (LT 2.x)" - patch -N -p0 < config/lt21a-pathCC.diff > /dev/null 2>&1 - fi - rm -f aclocal.m4.orig - - - # Libtool 1.5.2x and 2.1x automatically link in the "Cstd" STL library - # when using the Sun compilers on Linux or Solaris, even if the - # application does not use the STL (as of Feb 2008, Open MPI does not - # use any C++ STL). The problem is that Solaris has two different STL - # libraries: Cstd and stlport. Having Libtool choose that OMPI (and its - # wrapper compilers) use Cstd is problematic for users who want to - # compile their MPI applications with the other STL library. So we - # currently hack aclocal's LT macros to *not* add the Cstd library to - # any of OMPI's CXXFLAGS; the OMPI wrapper compilers can then therefore - # be used with any STL library -- it's the user's choice. - - echo " ++ patching to remove solaris Cstd" - sed -e 's/-lCstd -lCrun//' \ - -e 's/-library=Cstd -library=Crun//' \ - aclocal.m4 > aclocal.m4.new - cp aclocal.m4.new aclocal.m4 - rm -f aclocal.m4.new - fi - - run_and_check $ompi_autoconf - # We only need the libltdl stuff for the top-level # configure, not any of the MCA components. @@ -514,9 +471,75 @@ EOF mv configure.new configure chmod a+x configure fi + + # See http://lists.gnu.org/archive/html/bug-libtool/2008-05/msg00045.html + if check_version "2.1.9999" $ompi_libtoolize_found_version ; then + echo " ++ patching for ifort (LT 2.2.0-4)" + cd opal/libltdl/m4 + patch -N -p0 < ../../../config/lt224-icc.diff > /dev/null 2>&1 + rm -f libtool.m4.orig + cd ../../.. + fi else run_and_check $ompi_libtoolize --automake --copy fi + + if test -f $topdir_file; then + run_and_check $ompi_aclocal -I config + else + run_and_check $ompi_aclocal + fi + + if test "`grep AC_CONFIG_HEADER $file`" != "" -o \ + "`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 :-(" + if ! check_version "2.0.0" $ompi_libtoolize_found_version ; then + echo " ++ patching for pathscale multi-line output (LT 1.5.x)" + patch -N -p0 < config/lt1522-pathCC.diff > /dev/null 2>&1 + else + echo " ++ patching for pathscale multi-line output (LT 2.x)" + patch -N -p0 < config/lt21a-pathCC.diff > /dev/null 2>&1 + fi + # See http://lists.gnu.org/archive/html/bug-libtool/2008-05/msg00045.html + if check_version "2.1.9999" $ompi_libtoolize_found_version ; then + echo " ++ patching for ifort (LT 2.2.0-4)" + cd config + patch -N -p0 < lt224-icc.diff > /dev/null 2>&1 + rm -f libtool.m4.orig + cd .. + fi + rm -f aclocal.m4.orig + + + # Libtool 1.5.2x and 2.1x automatically link in the "Cstd" STL library + # when using the Sun compilers on Linux or Solaris, even if the + # application does not use the STL (as of Feb 2008, Open MPI does not + # use any C++ STL). The problem is that Solaris has two different STL + # libraries: Cstd and stlport. Having Libtool choose that OMPI (and its + # wrapper compilers) use Cstd is problematic for users who want to + # compile their MPI applications with the other STL library. So we + # currently hack aclocal's LT macros to *not* add the Cstd library to + # any of OMPI's CXXFLAGS; the OMPI wrapper compilers can then therefore + # be used with any STL library -- it's the user's choice. + + echo " ++ patching to remove solaris Cstd" + sed -e 's/-lCstd -lCrun//' \ + -e 's/-library=Cstd -library=Crun//' \ + aclocal.m4 > aclocal.m4.new + cp aclocal.m4.new aclocal.m4 + rm -f aclocal.m4.new + fi + + run_and_check $ompi_autoconf + run_and_check $ompi_automake --foreign -a --copy --include-deps } diff --git a/config/lt224-icc.diff b/config/lt224-icc.diff new file mode 100644 index 0000000000..88dcf9f6fc --- /dev/null +++ b/config/lt224-icc.diff @@ -0,0 +1,20 @@ +--- /users/jsquyres/svn/ompi2/config/libtool.m4 2008-05-21 07:48:07.000000000 -0700 ++++ libtool.m4 2008-05-25 05:12:37.000000000 -0700 +@@ -3962,12 +3962,17 @@ + + linux* | k*bsd*-gnu) + case $cc_basename in +- icc* | ecc* | ifort*) ++ icc* | ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; ++ ifort*) ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project)