build/autoconf/gcc-pr39608.m4

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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