1
1

Update -Wno-long-double test to support clang.

This prevents bazillions of warnings from clang tha -Wno-long-double
isn't supported.

The warning that clang issues when it see -Wno-long-double is does not
use any of the words we were looking for, so I added "unknown" to the
list of words to look for.  I also re-indented the two m4 tests so
that they're a bit more readable.

cmr=v1.7.4:reviewer=brbarret:subject=Update -Wno-long-double test to support clang

This commit was SVN r29681.
Этот коммит содержится в:
Jeff Squyres 2013-11-13 15:08:01 +00:00
родитель 4964a5e98b
Коммит 05f4f62db1
2 изменённых файлов: 47 добавлений и 41 удалений

Просмотреть файл

@ -145,27 +145,29 @@ AC_DEFUN([OPAL_SETUP_CC],[
CFLAGS="$CFLAGS $add -Wno-long-double -Wstrict-prototypes" CFLAGS="$CFLAGS $add -Wno-long-double -Wstrict-prototypes"
AC_CACHE_CHECK([if $CC supports -Wno-long-double], AC_CACHE_CHECK([if $CC supports -Wno-long-double],
[ompi_cv_cc_wno_long_double], [ompi_cv_cc_wno_long_double],
[AC_TRY_COMPILE([], [], [AC_TRY_COMPILE([], [],
[ [
dnl Alright, the -Wno-long-double did not produce any errors... dnl So -Wno-long-double did not produce any errors...
dnl Well well, try to extract a warning regarding unrecognized or ignored options dnl We will try to extract a warning regarding
AC_TRY_COMPILE([], [long double test;], dnl unrecognized or ignored options
[ AC_TRY_COMPILE([], [long double test;],
ompi_cv_cc_wno_long_double="yes" [
if test -s conftest.err ; then ompi_cv_cc_wno_long_double="yes"
dnl Yes, it should be "ignor", in order to catch ignoring and ignore if test -s conftest.err ; then
for i in invalid ignor unrecognized ; do dnl Yes, it should be "ignor", in order to catch ignoring and ignore
$GREP -iq $i conftest.err for i in unknown invalid ignor unrecognized ; do
if test "$?" = "0" ; then $GREP -iq $i conftest.err
ompi_cv_cc_wno_long_double="no" if test "$?" = "0" ; then
break; ompi_cv_cc_wno_long_double="no"
fi break;
done fi
fi done
], fi
[ompi_cv_cc_wno_long_double="no"])], ],
[ompi_cv_cc_wno_long_double="no"])]) [ompi_cv_cc_wno_long_double="no"])],
[ompi_cv_cc_wno_long_double="no"])
])
CFLAGS="$CFLAGS_orig" CFLAGS="$CFLAGS_orig"
if test "$ompi_cv_cc_wno_long_double" = "yes" ; then if test "$ompi_cv_cc_wno_long_double" = "yes" ; then

Просмотреть файл

@ -109,26 +109,30 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[
CXXFLAGS_orig="$CXXFLAGS" CXXFLAGS_orig="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $add -Wno-long-double -fstrict-prototype" CXXFLAGS="$CXXFLAGS $add -Wno-long-double -fstrict-prototype"
AC_CACHE_CHECK([if $CXX supports -Wno-long-double], AC_CACHE_CHECK([if $CXX supports -Wno-long-double],
[opal_cv_cxx_wno_long_double], [opal_cv_cxx_wno_long_double],
[AC_TRY_COMPILE([], [], [AC_TRY_COMPILE([], [],
[dnl Alright, the -Wno-long-double did not produce any errors... [
dnl Well well, try to extract a warning regarding unrecognized or ignored options dnl So -Wno-long-double did not produce any errors...
AC_TRY_COMPILE([], [long double test;], dnl We will try to extract a warning regarding
[ dnl unrecognized or ignored options
opal_cv_cxx_wno_long_double="yes" AC_TRY_COMPILE([], [long double test;],
if test -s conftest.err ; then [
dnl Yes, it should be "ignor", in order to catch ignoring and ignore ompi_cv_cxx_wno_long_double="yes"
for i in invalid ignor unrecognized ; do if test -s conftest.err ; then
$GREP -iq $i conftest.err dnl Yes, it should be "ignor", in order to catch ignoring and ignore
if test "$?" = "0" ; then for i in unknown invalid ignor unrecognized ; do
opal_cv_cxx_wno_long_double="no", $GREP -iq $i conftest.err
break; if test "$?" = "0" ; then
fi ompi_cv_cxx_wno_long_double="no"
done break;
fi fi
], done
[opal_cv_cxx_wno_long_double="no"])], fi
[opal_cv_cxx_wno_long_double="no"])]) ],
[ompi_cv_cxx_wno_long_double="no"])],
[ompi_cv_cxx_wno_long_double="no"])
])
CXXFLAGS="$CXXFLAGS_orig" CXXFLAGS="$CXXFLAGS_orig"
AC_LANG_POP(C++) AC_LANG_POP(C++)
if test "$opal_cv_cxx_wno_long_double" = "yes" ; then if test "$opal_cv_cxx_wno_long_double" = "yes" ; then