...and work around AC_RUN_IFELSE not working when cross-compiling
Change-Id: I7a3a9593cabec68c0d60c17a991207b5d3dab69c
This commit is contained in:
@@ -12586,6 +12586,9 @@ if test "$build_os" = "cygwin"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether $CXX has broken static initializer_list support])
|
AC_MSG_CHECKING([whether $CXX has broken static initializer_list support])
|
||||||
|
if test "$CROSS_COMPILING" = "TRUE"; then
|
||||||
|
broken='assuming not (cross-compiling)'
|
||||||
|
else
|
||||||
save_CXXFLAGS=$CXXFLAGS
|
save_CXXFLAGS=$CXXFLAGS
|
||||||
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
|
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
|
||||||
save_LIBS=$LIBS
|
save_LIBS=$LIBS
|
||||||
@@ -12594,8 +12597,8 @@ if test -n "$ILIB1"; then
|
|||||||
fi
|
fi
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
||||||
// Exit with failure if the static initializer_list is stored on the stack
|
// Exit with failure if the static initializer_list is stored on the
|
||||||
// (as done by Clang < 3.4):
|
// stack (as done by Clang < 3.4):
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
struct S {};
|
struct S {};
|
||||||
bool g(void const * p1, void const * p2) {
|
bool g(void const * p1, void const * p2) {
|
||||||
@@ -12613,6 +12616,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
|||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
LIBS=$save_LIBS
|
LIBS=$save_LIBS
|
||||||
CXXFLAGS=$save_CXXFLAGS
|
CXXFLAGS=$save_CXXFLAGS
|
||||||
|
fi
|
||||||
AC_MSG_RESULT([$broken])
|
AC_MSG_RESULT([$broken])
|
||||||
if test "$broken" = yes; then
|
if test "$broken" = yes; then
|
||||||
AC_DEFINE([HAVE_BROKEN_STATIC_INITILIZER_LIST])
|
AC_DEFINE([HAVE_BROKEN_STATIC_INITILIZER_LIST])
|
||||||
|
Reference in New Issue
Block a user