summaryrefslogtreecommitdiff
path: root/gcc-4.7-stlport.patch
blob: 7833d10c3945a12f1d47bb3cbc3bc1e0d213e1fe (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
--- gcc/gcc/config/linux-android.h.bero	2012-10-27 02:59:09.875320808 +0200
+++ gcc/gcc/config/linux-android.h	2012-10-27 02:59:49.515825233 +0200
@@ -47,7 +47,8 @@
 
 #define ANDROID_CC1PLUS_SPEC						\
   "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} "		\
-  "%{!frtti:%{!fno-rtti: -fno-rtti}}"
+  "%{!frtti:%{!fno-rtti: -fno-rtti}} "					\
+  "%{!nostdinc: -isystem /system/include/stlport}"
 
 #define ANDROID_LIB_SPEC \
   "%{!static: -ldl}"
--- gcc/gcc/cp/g++spec.c.bero	2012-10-27 02:39:28.779086543 +0200
+++ gcc/gcc/cp/g++spec.c	2012-10-27 02:41:25.434628148 +0200
@@ -326,6 +326,12 @@ lang_specific_driver (struct cl_decoded_
 		       CL_DRIVER, &new_decoded_options[j]);
       added_libraries++;
       j++;
+      /* Ugly but effective hack for Android: Add -lstlport as well */
+      generate_option (OPT_l,
+		       "stlport", 1,
+		       CL_DRIVER, &new_decoded_options[j]);
+      added_libraries++;
+      j++;
       /* Add target-dependent static library, if necessary.  */
       if ((static_link || library > 1) && LIBSTDCXX_STATIC != NULL)
 	{