~ubuntu-branches/ubuntu/natty/lightning-extension/natty-security

« back to all changes in this revision

Viewing changes to mozilla/build/autoconf/compiler-opts.m4

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-09-03 14:00:01 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20120903140001-iee9509f51oz7pqs
Tags: 1.8+build1-0ubuntu0.11.04.1
* New upstream stable release to support Thunderbird 16 (CALENDAR_1_8_BUILD1)
  - LP: #1062587

* Add extra Makefiles that are needed for the build
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
fi
53
53
])
54
54
 
 
55
dnl ============================================================================
 
56
dnl C++ rtti
 
57
dnl We don't use it in the code, but it can be usefull for debugging, so give
 
58
dnl the user the option of enabling it.
 
59
dnl ============================================================================
 
60
AC_DEFUN([MOZ_RTTI],
 
61
[
 
62
MOZ_ARG_ENABLE_BOOL(cpp-rtti,
 
63
[  --enable-cpp-rtti       Enable C++ RTTI ],
 
64
[ _MOZ_USE_RTTI=1 ],
 
65
[ _MOZ_USE_RTTI= ])
 
66
 
 
67
if test -z "$_MOZ_USE_RTTI"; then
 
68
    if test "$GNU_CC"; then
 
69
        CXXFLAGS="$CXXFLAGS -fno-rtti"
 
70
    else
 
71
        case "$target" in
 
72
        *-mingw*)
 
73
            CXXFLAGS="$CXXFLAGS -GR-"
 
74
        esac
 
75
    fi
 
76
fi
 
77
])
 
78
 
 
79
dnl A high level macro for selecting compiler options.
55
80
AC_DEFUN([MOZ_COMPILER_OPTS],
56
81
[
 
82
  MOZ_RTTI
57
83
if test "$CLANG_CXX"; then
58
84
    ## We disable return-type-c-linkage because jsval is defined as a C++ type but is
59
85
    ## returned by C functions. This is possible because we use knowledge about the ABI
64
90
 
65
91
if test "$GNU_CC"; then
66
92
    CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
67
 
    CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
 
93
    CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-exceptions"
68
94
fi
69
95
 
70
96
dnl ========================================================