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.
Этот коммит содержится в:
родитель
4964a5e98b
Коммит
05f4f62db1
@ -145,27 +145,29 @@ AC_DEFUN([OPAL_SETUP_CC],[
|
||||
CFLAGS="$CFLAGS $add -Wno-long-double -Wstrict-prototypes"
|
||||
|
||||
AC_CACHE_CHECK([if $CC supports -Wno-long-double],
|
||||
[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
|
||||
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
|
||||
$GREP -iq $i conftest.err
|
||||
if test "$?" = "0" ; then
|
||||
ompi_cv_cc_wno_long_double="no"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
],
|
||||
[ompi_cv_cc_wno_long_double="no"])],
|
||||
[ompi_cv_cc_wno_long_double="no"])])
|
||||
[ompi_cv_cc_wno_long_double],
|
||||
[AC_TRY_COMPILE([], [],
|
||||
[
|
||||
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 unknown invalid ignor unrecognized ; do
|
||||
$GREP -iq $i conftest.err
|
||||
if test "$?" = "0" ; then
|
||||
ompi_cv_cc_wno_long_double="no"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
],
|
||||
[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
|
||||
|
@ -109,26 +109,30 @@ AC_DEFUN([_OPAL_SETUP_CXX_COMPILER_BACKEND],[
|
||||
CXXFLAGS_orig="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $add -Wno-long-double -fstrict-prototype"
|
||||
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
|
||||
AC_TRY_COMPILE([], [long double test;],
|
||||
[
|
||||
opal_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
|
||||
$GREP -iq $i conftest.err
|
||||
if test "$?" = "0" ; then
|
||||
opal_cv_cxx_wno_long_double="no",
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
],
|
||||
[opal_cv_cxx_wno_long_double="no"])],
|
||||
[opal_cv_cxx_wno_long_double="no"])])
|
||||
[opal_cv_cxx_wno_long_double],
|
||||
[AC_TRY_COMPILE([], [],
|
||||
[
|
||||
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_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 unknown invalid ignor unrecognized ; do
|
||||
$GREP -iq $i conftest.err
|
||||
if test "$?" = "0" ; then
|
||||
ompi_cv_cxx_wno_long_double="no"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
],
|
||||
[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
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user