diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-04-15 19:51:17 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-04-18 17:39:31 -0700 |
commit | 4d0352f01e1ab1811b83c00f37b1e4c2fc35717f (patch) | |
tree | b922ea8e89f8991cc189db5648835d17b9dc9bd1 /build/tools/toolchain-patches/gcc | |
parent | 13625c778276b0a050dede78d063779e86506531 (diff) | |
download | ndk-4d0352f01e1ab1811b83c00f37b1e4c2fc35717f.tar.gz |
Add gcc-4.9/binutils-2.24
Now gcc4.8 also compile with binutils-2.24 as well (from 2.23)
Change-Id: I249dd4414182d2b42c231ca9dbe1e2ec960b995e
Diffstat (limited to 'build/tools/toolchain-patches/gcc')
3 files changed, 80 insertions, 12 deletions
diff --git a/build/tools/toolchain-patches/gcc/0001-Enable-C-exceptions-and-RTTI-by-default.patch b/build/tools/toolchain-patches/gcc/0001-Enable-C-exceptions-and-RTTI-by-default.patch index fd727cfe3..eca3ca90c 100644 --- a/build/tools/toolchain-patches/gcc/0001-Enable-C-exceptions-and-RTTI-by-default.patch +++ b/build/tools/toolchain-patches/gcc/0001-Enable-C-exceptions-and-RTTI-by-default.patch @@ -6,11 +6,13 @@ 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 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + 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 94c5274..7256082 100644 +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 @@ @@ -25,7 +27,7 @@ index 94c5274..7256082 100644 #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 2c87c84..47a3e7c 100644 +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 @@ @@ -39,5 +41,21 @@ index 2c87c84..47a3e7c 100644 #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: -fPIC}}}}" + + #define ANDROID_CC1PLUS_SPEC \ +- "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ +- "%{!frtti:%{!fno-rtti: -fno-rtti}}" ++ "%{!fexceptions:%{!fno-exceptions: -fexceptions}} " \ ++ "%{!frtti:%{!fno-rtti: -frtti}}" + + #define ANDROID_LIB_SPEC \ + "%{!static: -ldl}" -- -1.7.6.rc0 +1.9.1.423.g4596e3a + diff --git a/build/tools/toolchain-patches/gcc/0002-gcc-prevent-crash-on-Eclair-and-older-platforms.patch b/build/tools/toolchain-patches/gcc/0002-gcc-prevent-crash-on-Eclair-and-older-platforms.patch index ee9f3075c..b67cd977f 100644 --- a/build/tools/toolchain-patches/gcc/0002-gcc-prevent-crash-on-Eclair-and-older-platforms.patch +++ b/build/tools/toolchain-patches/gcc/0002-gcc-prevent-crash-on-Eclair-and-older-platforms.patch @@ -21,8 +21,10 @@ completely. And we don't need them because the pthread symbols are all in the C library on Android, unlike legacy Linux systems which put them in libpthread.so (and provide weak stubs in libc.so). --- - gcc-4.6/gcc/gthr-posix.h | 13 +++++++++++++ - 2 files changed, 26 insertions(+), 0 deletions(-) + gcc-4.6/gcc/gthr-posix.h | 13 +++++++++++++ + gcc-4.8/libgcc/gthr-posix.h | 13 +++++++++++++ + gcc-4.9/libgcc/gthr-posix.h | 13 +++++++++++++ + 3 files changed, 39 insertions(+) diff --git a/gcc-4.6/gcc/gthr-posix.h b/gcc-4.6/gcc/gthr-posix.h index ecb06e2..8372c64 100644 @@ -72,6 +74,30 @@ index f0d8cd7..1d03af0 100644 #include <pthread.h> #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \ +diff --git a/gcc-4.9/libgcc/gthr-posix.h b/gcc-4.9/libgcc/gthr-posix.h +index 7003a91..19d7d5f 100644 +--- a/gcc-4.9/libgcc/gthr-posix.h ++++ b/gcc-4.9/libgcc/gthr-posix.h +@@ -32,6 +32,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define __GTHREADS 1 + #define __GTHREADS_CXX0X 1 + ++/* The following should normally be in a different header file, ++ * but I couldn't find the right location. The point of the macro ++ * definition below is to prevent libsupc++ and libstdc++ to reference ++ * weak symbols in their static C++ constructors. Such code crashes ++ * when a shared object linked statically to these libraries is ++ * loaded on Android 2.1 (Eclair) and older platform releases, due ++ * to a dynamic linker bug. ++ */ ++#ifdef __ANDROID__ ++#undef GTHREAD_USE_WEAK ++#define GTHREAD_USE_WEAK 0 ++#endif ++ + #include <pthread.h> + + #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \ -- -1.7.6.rc0 +1.9.1.423.g4596e3a diff --git a/build/tools/toolchain-patches/gcc/0003-Rename-libstdc++.so-to-libgnustl_shared.so.patch b/build/tools/toolchain-patches/gcc/0003-Rename-libstdc++.so-to-libgnustl_shared.so.patch index e9ef86b86..411a330cb 100644 --- a/build/tools/toolchain-patches/gcc/0003-Rename-libstdc++.so-to-libgnustl_shared.so.patch +++ b/build/tools/toolchain-patches/gcc/0003-Rename-libstdc++.so-to-libgnustl_shared.so.patch @@ -10,10 +10,11 @@ Change-Id: I63fb5be818115c6d0c7e96b937ba39f225b475cf --- gcc-4.6/libstdc++-v3/src/Makefile.in | 5 ++++- gcc-4.8/libstdc++-v3/src/Makefile.in | 5 ++++- - 2 files changed, 8 insertions(+), 2 deletions(-) + gcc-4.9/libstdc++-v3/src/Makefile.in | 5 ++++- + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc-4.6/libstdc++-v3/src/Makefile.in b/gcc-4.6/libstdc++-v3/src/Makefile.in -index 146ec3f..99f0f56 100644 +index d03acd5..5abd1d2 100644 --- a/gcc-4.6/libstdc++-v3/src/Makefile.in +++ b/gcc-4.6/libstdc++-v3/src/Makefile.in @@ -340,7 +340,7 @@ WARN_CXXFLAGS = \ @@ -36,7 +37,7 @@ index 146ec3f..99f0f56 100644 -rm -f *.$(OBJEXT) diff --git a/gcc-4.8/libstdc++-v3/src/Makefile.in b/gcc-4.8/libstdc++-v3/src/Makefile.in -index 69001b4..e875539 100644 +index 9721ebb..dd3d426 100644 --- a/gcc-4.8/libstdc++-v3/src/Makefile.in +++ b/gcc-4.8/libstdc++-v3/src/Makefile.in @@ -336,7 +336,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) @@ -58,6 +59,29 @@ index 69001b4..e875539 100644 mostlyclean-compile: -rm -f *.$(OBJEXT) +diff --git a/gcc-4.9/libstdc++-v3/src/Makefile.in b/gcc-4.9/libstdc++-v3/src/Makefile.in +index cd3943b..ec04005 100644 +--- a/gcc-4.9/libstdc++-v3/src/Makefile.in ++++ b/gcc-4.9/libstdc++-v3/src/Makefile.in +@@ -342,7 +342,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) + SUBDIRS = c++98 c++11 + + # Cross compiler support. +-toolexeclib_LTLIBRARIES = libstdc++.la ++toolexeclib_LTLIBRARIES = libgnustl_shared.la + @GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = + @GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc + parallel_compat_sources = \ +@@ -552,6 +552,9 @@ clean-toolexeclibLTLIBRARIES: + libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) + $(libstdc___la_LINK) -rpath $(toolexeclibdir) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS) + ++libgnustl_shared.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) ++ $(libstdc___la_LINK) -rpath $(toolexeclibdir) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS) ++ + mostlyclean-compile: + -rm -f *.$(OBJEXT) + -- -1.7.6.rc0 +1.9.1.423.g4596e3a |