aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgcc/config
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-02-10 14:40:41 -0800
committerCaroline Tice <cmtice@google.com>2016-02-26 08:25:55 -0800
commit817a788f9eb01eff367191401d48f2aaa8d4f428 (patch)
tree637f745404b37fbf3fcff629227d7d542725e5fe /gcc-4.9/libgcc/config
parenta4ca82cac69c3147143d7b4b4d7cdeb5e02f20ef (diff)
downloadtoolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.gz
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.bz2
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.zip
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/config')
-rw-r--r--gcc-4.9/libgcc/config/i386/cpuinfo.c16
-rw-r--r--gcc-4.9/libgcc/config/i386/t-linux6
2 files changed, 20 insertions, 2 deletions
diff --git a/gcc-4.9/libgcc/config/i386/cpuinfo.c b/gcc-4.9/libgcc/config/i386/cpuinfo.c
index 6ff7502bb..3cfda0270 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 4f47f7bfa..12aab16b6 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