aboutsummaryrefslogtreecommitdiff
path: root/build/tools/toolchain-patches/gcc/0002-Enable-C-exceptions-and-RTTI-by-default.patch
blob: 57324bfba403dac5c34198f429f325ad03a186ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From 4fe805f627c018d77091ea0aad92553c54d47567 Mon Sep 17 00:00:00 2001
From: David 'Digit' Turner <digit@google.com>
Date: Fri, 17 Feb 2012 19:35:45 +0100
Subject: Enable C++ exceptions and RTTI by default.

With this change, -fexceptions and -frtti become default options
when compiling C++ sources.
---
 gcc-4.6/gcc/config/linux-android.h | 4 ++--
 gcc-4.8/gcc/config/linux-android.h | 4 ++--
 gcc-4.9/gcc/config/linux-android.h | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc-4.6/gcc/config/linux-android.h b/gcc-4.6/gcc/config/linux-android.h
index c19b1c1..6fa4f53 100644
--- a/gcc-4.6/gcc/config/linux-android.h
+++ b/gcc-4.6/gcc/config/linux-android.h
@@ -46,8 +46,8 @@
   "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: " ANDROID_PIC_DEFAULT "}}}}"
 
 #define ANDROID_CC1PLUS_SPEC						\
-  "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} "		\
-  "%{!frtti:%{!fno-rtti: -fno-rtti}}"
+  "%{!fexceptions:%{!fno-exceptions: -fexceptions}} "		\
+  "%{!frtti:%{!fno-rtti: -frtti}}"
 
 #define ANDROID_ASM_SPEC \
   "--noexecstack"
diff --git a/gcc-4.8/gcc/config/linux-android.h b/gcc-4.8/gcc/config/linux-android.h
index 87957e3..e88ab78 100644
--- a/gcc-4.8/gcc/config/linux-android.h
+++ b/gcc-4.8/gcc/config/linux-android.h
@@ -45,8 +45,8 @@
   "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: " ANDROID_PIC_DEFAULT "}}}}"
 
 #define ANDROID_CC1PLUS_SPEC						\
-  "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} "		\
-  "%{!frtti:%{!fno-rtti: -fno-rtti}}"
+  "%{!fexceptions:%{!fno-exceptions: -fexceptions}} "		\
+  "%{!frtti:%{!fno-rtti: -frtti}}"
 
 #define ANDROID_ASM_SPEC \
   "--noexecstack"
diff --git a/gcc-4.9/gcc/config/linux-android.h b/gcc-4.9/gcc/config/linux-android.h
index 26f1a74..e5114c2 100644
--- a/gcc-4.9/gcc/config/linux-android.h
+++ b/gcc-4.9/gcc/config/linux-android.h
@@ -45,8 +45,8 @@
   "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: " ANDROID_PIC_DEFAULT "}}}}"
 
 #define ANDROID_CC1PLUS_SPEC						\
-  "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} "		\
-  "%{!frtti:%{!fno-rtti: -fno-rtti}}"
+  "%{!fexceptions:%{!fno-exceptions: -fexceptions}} "		\
+  "%{!frtti:%{!fno-rtti: -frtti}}"
 
 #define ANDROID_ASM_SPEC \
   "--noexecstack"
-- 
1.9.1.423.g4596e3a