Wed, 31 Dec 2014 06:09:35 +0100
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 Set MOZ_FRAMEPTR_FLAGS to the flags that should be used for enabling or
6 dnl disabling frame pointers in this architecture based on the configure
7 dnl options
9 AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
10 case "$target" in
11 *android*)
12 unwind_tables="-funwind-tables"
13 ;;
14 esac
15 if test "$GNU_CC"; then
16 MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables"
17 MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer"
18 if test "$CPU_ARCH" = arm; then
19 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398
20 MOZ_ENABLE_FRAME_PTR="$unwind_tables"
21 fi
22 else
23 case "$target" in
24 *-mingw*)
25 MOZ_ENABLE_FRAME_PTR="-Oy-"
26 MOZ_DISABLE_FRAME_PTR="-Oy"
27 ;;
28 esac
29 fi
31 # if we are debugging, profiling or using ASAN, we want a frame pointer.
32 if test -z "$MOZ_OPTIMIZE" -o \
33 -n "$MOZ_PROFILING" -o \
34 -n "$MOZ_DEBUG" -o \
35 -n "$MOZ_ASAN"; then
36 MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR"
37 else
38 MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR"
39 fi
40 ])