build/autoconf/gcc-pr39608.m4

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 dnl This Source Code Form is subject to the terms of the Mozilla Public
     2 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
     3 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
     5 dnl Check if the compiler is gcc and has pr39608. If so
     6 dnl disable vrp.
     8 AC_DEFUN([MOZ_GCC_PR39608],
     9 [
    10 AC_MSG_CHECKING(for gcc pr39608)
    11 ac_have_gcc_pr39608="yes"
    12 AC_LANG_SAVE
    13 AC_LANG_CPLUSPLUS
    15 AC_TRY_COMPILE([
    16 typedef void (*FuncType)();
    17 template<FuncType Impl>
    18 void f();
    19 template<typename T> class C {
    20   typedef C<T> ThisC;
    21   template<int g()>
    22   static void h() {
    23     f<ThisC::h<g> >();
    24   }
    25 };
    26 ], true,
    27    ac_have_gcc_pr39608="no",
    28    true)
    30 AC_LANG_RESTORE
    32 AC_MSG_RESULT($ac_have_gcc_pr39608)
    33 if test "$ac_have_gcc_pr39608" = "yes"; then
    34    echo This compiler would fail to build firefox, please upgrade.
    35    exit 1
    36 fi
    37 ])

mercurial