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 удалений

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

@ -148,14 +148,15 @@ AC_DEFUN([OPAL_SETUP_CC],[
[ompi_cv_cc_wno_long_double],
[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...
dnl We will try to extract a warning regarding
dnl unrecognized or ignored options
AC_TRY_COMPILE([], [long double test;],
[
ompi_cv_cc_wno_long_double="yes"
if test -s conftest.err ; then
dnl Yes, it should be "ignor", in order to catch ignoring and ignore
for i in invalid ignor unrecognized ; do
for i in unknown invalid ignor unrecognized ; do
$GREP -iq $i conftest.err
if test "$?" = "0" ; then
ompi_cv_cc_wno_long_double="no"
@ -165,7 +166,8 @@ AC_DEFUN([OPAL_SETUP_CC],[
fi
],
[ompi_cv_cc_wno_long_double="no"])],
[ompi_cv_cc_wno_long_double="no"])])
[ompi_cv_cc_wno_long_double="no"])
])
CFLAGS="$CFLAGS_orig"
if test "$ompi_cv_cc_wno_long_double" = "yes" ; then

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

@ -111,24 +111,28 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[
AC_CACHE_CHECK([if $CXX supports -Wno-long-double],
[opal_cv_cxx_wno_long_double],
[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...
dnl We will try to extract a warning regarding
dnl unrecognized or ignored options
AC_TRY_COMPILE([], [long double test;],
[
opal_cv_cxx_wno_long_double="yes"
ompi_cv_cxx_wno_long_double="yes"
if test -s conftest.err ; then
dnl Yes, it should be "ignor", in order to catch ignoring and ignore
for i in invalid ignor unrecognized ; do
for i in unknown invalid ignor unrecognized ; do
$GREP -iq $i conftest.err
if test "$?" = "0" ; then
opal_cv_cxx_wno_long_double="no",
ompi_cv_cxx_wno_long_double="no"
break;
fi
done
fi
],
[opal_cv_cxx_wno_long_double="no"])],
[opal_cv_cxx_wno_long_double="no"])])
[ompi_cv_cxx_wno_long_double="no"])],
[ompi_cv_cxx_wno_long_double="no"])
])
CXXFLAGS="$CXXFLAGS_orig"
AC_LANG_POP(C++)
if test "$opal_cv_cxx_wno_long_double" = "yes" ; then