aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgcc
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-02-10 22:40:41 (GMT)
committerCaroline Tice <cmtice@google.com>2016-02-26 16:25:55 (GMT)
commit817a788f9eb01eff367191401d48f2aaa8d4f428 (patch)
tree637f745404b37fbf3fcff629227d7d542725e5fe /gcc-4.9/libgcc
parenta4ca82cac69c3147143d7b4b4d7cdeb5e02f20ef (diff)
downloadtoolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.zip
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.gz
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.bz2
Unify ChromeOS and Android versions of GCC.
This CL updates Android's GCC to match ChromeOS's GCC (with appropriate patches applied in both places to make sure no cherry-picked changes are lost). Change-Id: I390140c449b0e5df9ee78a06268319c8c510302f
Diffstat (limited to 'gcc-4.9/libgcc')
-rw-r--r--gcc-4.9/libgcc/config.host2
-rw-r--r--gcc-4.9/libgcc/config/i386/cpuinfo.c16
-rw-r--r--gcc-4.9/libgcc/config/i386/t-linux6
3 files changed, 21 insertions, 3 deletions
diff --git a/gcc-4.9/libgcc/config.host b/gcc-4.9/libgcc/config.host
index b089fb9..896a31d 100644
--- a/gcc-4.9/libgcc/config.host
+++ b/gcc-4.9/libgcc/config.host
@@ -1247,7 +1247,7 @@ i[34567]86-*-linux* | x86_64-*-linux* | \
i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
i[34567]86-*-knetbsd*-gnu | \
i[34567]86-*-gnu*)
- tmake_file="${tmake_file} t-tls i386/t-linux"
+ tmake_file="${tmake_file} t-tls i386/t-linux t-slibgcc-libgcc"
if test "$libgcc_cv_cfi" = "yes"; then
tmake_file="${tmake_file} t-stack i386/t-stack-i386"
fi
diff --git a/gcc-4.9/libgcc/config/i386/cpuinfo.c b/gcc-4.9/libgcc/config/i386/cpuinfo.c
index 6ff7502..3cfda02 100644
--- a/gcc-4.9/libgcc/config/i386/cpuinfo.c
+++ b/gcc-4.9/libgcc/config/i386/cpuinfo.c
@@ -34,6 +34,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif
int __cpu_indicator_init (void)
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
__attribute__ ((constructor CONSTRUCTOR_PRIORITY));
/* Processor Vendor and Models. */
@@ -99,13 +102,16 @@ enum processor_features
FEATURE_FMA
};
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
struct __processor_model
{
unsigned int __cpu_vendor;
unsigned int __cpu_type;
unsigned int __cpu_subtype;
unsigned int __cpu_features[1];
-} __cpu_model;
+} __cpu_model = { };
/* Get the specific type of AMD CPU. */
@@ -321,6 +327,9 @@ __get_cpuid_output (unsigned int __level,
needs to be called explicitly there. */
int __attribute__ ((constructor CONSTRUCTOR_PRIORITY))
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
__cpu_indicator_init (void)
{
unsigned int eax, ebx, ecx, edx;
@@ -403,3 +412,8 @@ __cpu_indicator_init (void)
return 0;
}
+
+#if defined SHARED && defined USE_ELF_SYMVER
+__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
+__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
+#endif
diff --git a/gcc-4.9/libgcc/config/i386/t-linux b/gcc-4.9/libgcc/config/i386/t-linux
index 4f47f7b..12aab16 100644
--- a/gcc-4.9/libgcc/config/i386/t-linux
+++ b/gcc-4.9/libgcc/config/i386/t-linux
@@ -3,4 +3,8 @@
# t-slibgcc-elf-ver and t-linux
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
-HOST_LIBGCC2_CFLAGS += -mlong-double-80
+# Work around gold bug:
+# https://sourceware.org/bugzilla/show_bug.cgi?id=18703
+SHLIB_LDFLAGS += -fuse-ld=bfd
+
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER