From 9d19dec80acd1066aaceebd7e2c85250fb74b180 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 6 May 2014 17:42:51 +0000 Subject: [PATCH] [ompi|opal]_setup_cxx.m4: ensure to use the C++ compiler (!) We didn't AC_LANG_PUSH(C++) before checking to see if the compiler supports -finline-functions, meaning that configure used the C compiler for these checkes, not the C++ compiler. Due to #2999, we have to fix both opal_setup_cxx.m4 and ompi_setup_cxx.m4. cmr=v1.8.2:reviewer=rolfv This commit was SVN r31651. --- config/ompi_setup_cxx.m4 | 2 ++ config/opal_setup_cxx.m4 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config/ompi_setup_cxx.m4 b/config/ompi_setup_cxx.m4 index 37757a6b7e..14b920bab2 100644 --- a/config/ompi_setup_cxx.m4 +++ b/config/ompi_setup_cxx.m4 @@ -214,11 +214,13 @@ AC_DEFUN([_OMPI_SETUP_CXX_COMPILER_BACKEND],[ CXXFLAGS_orig="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -finline-functions" add= + AC_LANG_PUSH(C++) AC_CACHE_CHECK([if $CXX supports -finline-functions], [ompi_cv_cxx_finline_functions], [AC_TRY_COMPILE([], [], [ompi_cv_cxx_finline_functions="yes"], [ompi_cv_cxx_finline_functions="no"])]) + AC_LANG_POP(C++) if test "$ompi_cv_cxx_finline_functions" = "yes" ; then add=" -finline-functions" fi diff --git a/config/opal_setup_cxx.m4 b/config/opal_setup_cxx.m4 index 9d1f59cbcd..43492198d8 100644 --- a/config/opal_setup_cxx.m4 +++ b/config/opal_setup_cxx.m4 @@ -152,11 +152,13 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[ CXXFLAGS_orig="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -finline-functions" add= + AC_LANG_PUSH(C++) AC_CACHE_CHECK([if $CXX supports -finline-functions], [opal_cv_cxx_finline_functions], [AC_TRY_COMPILE([], [], [opal_cv_cxx_finline_functions="yes"], [opal_cv_cxx_finline_functions="no"])]) + AC_LANG_POP(C++) if test "$opal_cv_cxx_finline_functions" = "yes" ; then add=" -finline-functions" fi