Changeset 161359 in webkit


Ignore:
Timestamp:
Jan 6, 2014 12:03:05 PM (10 years ago)
Author:
zandobersek@gmail.com
Message:

[GTK] configure errors out when building with libc++
https://bugs.webkit.org/show_bug.cgi?id=126431

Reviewed by Martin Robinson.

Ease up the Clang and libstdc++ combination test to only fail if libstdc++ < 4.8.1 is actually used.
This allows for libc++ to be used as well. The test is moved into SetupCompilerFlags.m4 and is done
after the CXXFLAGS variable is properly set up, that is when all the C++ compiler options are determined.

  • Source/autotools/CheckSystemAndBasicDependencies.m4:
  • Source/autotools/SetupCompilerFlags.m4:
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r161351 r161359  
     12014-01-06  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK] configure errors out when building with libc++
     4        https://bugs.webkit.org/show_bug.cgi?id=126431
     5
     6        Reviewed by Martin Robinson.
     7
     8        Ease up the Clang and libstdc++ combination test to only fail if libstdc++ < 4.8.1 is actually used.
     9        This allows for libc++ to be used as well. The test is moved into SetupCompilerFlags.m4 and is done
     10        after the CXXFLAGS variable is properly set up, that is when all the C++ compiler options are determined.
     11
     12        * Source/autotools/CheckSystemAndBasicDependencies.m4:
     13        * Source/autotools/SetupCompilerFlags.m4:
     14
    1152014-01-06  Martin Robinson  <mrobinson@igalia.com>
    216
  • trunk/Source/autotools/CheckSystemAndBasicDependencies.m4

    r159928 r161359  
    120120if test "$cxx_compiler" = "unknown"; then
    121121    AC_MSG_ERROR([Compiler GCC >= 4.7 or Clang >= 3.2 is required for C++ compilation])
    122 elif test "$cxx_compiler" = "clang++"; then
    123     OLD_CXXFLAGS="$CXXFLAGS"
    124     CXXFLAGS="-std=c++11"
    125     AC_LANG_PUSH([C++])
    126     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
    127 #include <type_traits>
    128 #if defined(__GLIBCXX__) && __GLIBCXX__ >= 20130531
    129 bool libstdcxxTest = std::is_trivially_destructible<bool>::value;
    130 #else
    131 #error libstdc++ >= 4.8.1 is required
    132 #endif
    133 ])], [], [AC_MSG_ERROR([libstdc++ >= 4.8.1 is required as the standard library used with the Clang compiler.])])
    134     AC_LANG_POP([C++])
    135     CXXFLAGS="$OLD_CXXFLAGS"
    136122fi
    137123
  • trunk/Source/autotools/SetupCompilerFlags.m4

    r161333 r161359  
    1717        AS_CASE([$CXXFLAGS], [*-stdlib=*], [], [CXXFLAGS="$CXXFLAGS -stdlib=libc++"])
    1818    fi
     19
     20    # If Clang will be using libstdc++ as the standard library, version >= 4.8.1 should be in use.
     21    AC_LANG_PUSH([C++])
     22    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
     23#if defined(__GLIBCXX__) && __GLIBCXX__ >= 20130531
     24#include <type_traits>
     25bool libstdcxxTest = std::is_trivially_destructible<bool>::value;
     26#endif
     27])], [], [AC_MSG_ERROR([libstdc++ >= 4.8.1 is required as the standard library used with the Clang compiler.])])
     28    AC_LANG_POP([C++])
    1929fi
    2030
Note: See TracChangeset for help on using the changeset viewer.