aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6')
-rw-r--r--gcc-4.6/gcc/ChangeLog.google-4_620
-rw-r--r--gcc-4.6/gcc/config/i386/linux.h39
-rw-r--r--gcc-4.6/gcc/config/i386/linux64.h39
-rw-r--r--gcc-4.6/gcc/config/linux-android.h4
4 files changed, 86 insertions, 16 deletions
diff --git a/gcc-4.6/gcc/ChangeLog.google-4_6 b/gcc-4.6/gcc/ChangeLog.google-4_6
index f25ec13c7..8fa1fb31b 100644
--- a/gcc-4.6/gcc/ChangeLog.google-4_6
+++ b/gcc-4.6/gcc/ChangeLog.google-4_6
@@ -1,3 +1,23 @@
+2012-05-07 Jing Yu <jingyu@google.com>
+
+ Backport r186560 and r185958 from gcc trunk
+ 2012-05-03 Enkovich Ilya <ilya.enkovich@intel.com>
+
+ * config/linux-android.h (ANDROID_STARTFILE_SPEC): Fix
+ shared case.
+ (ANDROID_ENDFILE_SPEC): Likewise.
+ * config/i386/linux.h (TARGET_OS_CPP_BUILTINS): Add Android
+ builtins.
+ (LINUX_TARGET_CC1_SPEC): New.
+ (CC1_SPEC): Support Android.
+ (LINUX_TARGET_LINK_SPEC): New.
+ (LINK_SPEC): Support Android.
+ (LIB_SPEC): New.
+ (STARTFILE_SPEC): New.
+ (LINUX_TARGET_ENDFILE_SPEC): New.
+ (ENDFILE_SPEC): Support Android.
+ * config/i386/linux64.h: Likewise.
+
2012-03-01 Jing Yu <jingyu@google.com>
Backport r184061 from gcc-4_6-branch to fix PR52060.
diff --git a/gcc-4.6/gcc/config/i386/linux.h b/gcc-4.6/gcc/config/i386/linux.h
index 3a23598f9..414dc65bf 100644
--- a/gcc-4.6/gcc/config/i386/linux.h
+++ b/gcc-4.6/gcc/config/i386/linux.h
@@ -73,14 +73,19 @@ along with GCC; see the file COPYING3. If not see
do \
{ \
LINUX_TARGET_OS_CPP_BUILTINS(); \
+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+#define LINUX_TARGET_CC1_SPEC "%(cc1_cpu) %{profile:-p}"
+
#undef CC1_SPEC
-#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
+#define CC1_SPEC \
+ LINUX_OR_ANDROID_CC (LINUX_TARGET_CC1_SPEC, \
+ LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
/* Provide a LINK_SPEC appropriate for Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to
@@ -112,22 +117,42 @@ along with GCC; see the file COPYING3. If not see
{ "link_emulation", LINK_EMULATION },\
{ "dynamic_linker", LINUX_DYNAMIC_LINKER }
-#undef LINK_SPEC
-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
+#define LINUX_TARGET_LINK_SPEC \
+ "-m %(link_emulation) %{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
-dynamic-linker %(dynamic_linker)} \
%{static:-static}}"
+#undef LINK_SPEC
+#define LINK_SPEC \
+ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
+ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+
+#undef LIB_SPEC
+#define LIB_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
+ GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, \
+ ANDROID_STARTFILE_SPEC)
+
/* Similar to standard Linux, but adding -ffast-math support. */
-#undef ENDFILE_SPEC
-#define ENDFILE_SPEC \
+#define LINUX_TARGET_ENDFILE_SPEC \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
%{mpc32:crtprec32.o%s} \
%{mpc64:crtprec64.o%s} \
- %{mpc80:crtprec80.o%s} \
- %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+ %{mpc80:crtprec80.o%s}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ LINUX_OR_ANDROID_LD (LINUX_TARGET_ENDFILE_SPEC " " \
+ GNU_USER_TARGET_ENDFILE_SPEC, \
+ LINUX_TARGET_ENDFILE_SPEC " "\
+ ANDROID_ENDFILE_SPEC)
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
diff --git a/gcc-4.6/gcc/config/i386/linux64.h b/gcc-4.6/gcc/config/i386/linux64.h
index b3fe50072..96c839000 100644
--- a/gcc-4.6/gcc/config/i386/linux64.h
+++ b/gcc-4.6/gcc/config/i386/linux64.h
@@ -34,14 +34,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
do \
{ \
LINUX_TARGET_OS_CPP_BUILTINS(); \
+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+#define LINUX_TARGET_CC1_SPEC "%(cc1_cpu) %{profile:-p}"
+
#undef CC1_SPEC
-#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
+#define CC1_SPEC \
+ LINUX_OR_ANDROID_CC (LINUX_TARGET_CC1_SPEC, \
+ LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
/* The svr4 ABI for the i386 says that records and unions are returned
in memory. In the 64bit compilation we will turn this flag off in
@@ -80,8 +85,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define ASM_SPEC "%{" SPEC_32 ":--32} %{" SPEC_64 ":--64} \
%{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
-#undef LINK_SPEC
-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \
+#define LINUX_TARGET_LINK_SPEC \
+ "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \
%{shared:-shared} \
%{!shared: \
%{!static: \
@@ -90,6 +95,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
%{" SPEC_64 ":-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \
%{static:-static}}"
+#undef LINK_SPEC
+#define LINK_SPEC \
+ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
+ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+
+#undef LIB_SPEC
+#define LIB_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
+ GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, \
+ ANDROID_STARTFILE_SPEC)
+
/* These may be provided by config/linux-grtev2.h. */
#ifndef LINUX_GRTE_EXTRA_SPECS
#define LINUX_GRTE_EXTRA_SPECS
@@ -100,13 +120,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
LINUX_GRTE_EXTRA_SPECS
/* Similar to standard Linux, but adding -ffast-math support. */
-#undef ENDFILE_SPEC
-#define ENDFILE_SPEC \
+#define LINUX_TARGET_ENDFILE_SPEC \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
%{mpc32:crtprec32.o%s} \
%{mpc64:crtprec64.o%s} \
- %{mpc80:crtprec80.o%s} \
- %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+ %{mpc80:crtprec80.o%s}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ LINUX_OR_ANDROID_LD (LINUX_TARGET_ENDFILE_SPEC " " \
+ GNU_USER_TARGET_ENDFILE_SPEC, \
+ LINUX_TARGET_ENDFILE_SPEC " "\
+ ANDROID_ENDFILE_SPEC)
#if TARGET_64BIT_DEFAULT
#define MULTILIB_DEFAULTS { "m64" }
diff --git a/gcc-4.6/gcc/config/linux-android.h b/gcc-4.6/gcc/config/linux-android.h
index 94c52748f..acbc6627f 100644
--- a/gcc-4.6/gcc/config/linux-android.h
+++ b/gcc-4.6/gcc/config/linux-android.h
@@ -53,8 +53,8 @@
"%{!static: -ldl}"
#define ANDROID_STARTFILE_SPEC \
- "%{!shared:" \
+ "%{shared: crtbegin_so%O%s;:" \
" %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
#define ANDROID_ENDFILE_SPEC \
- "%{!shared: crtend_android%O%s}"
+ "%{shared: crtend_so%O%s;: crtend_android%O%s}"