OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc48?expand=0&rev=204
135 lines
4.9 KiB
Diff
135 lines
4.9 KiB
Diff
2015-04-17 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
PR target/65612
|
|
* config.host (tmake_file): Add t-slibgcc-libgcc for Linux/x86.
|
|
* config/i386/cpuinfo.c (__cpu_model): Initialize.
|
|
(__cpu_indicator_init@GCC_4.8.0): New.
|
|
(__cpu_model@GCC_4.8.0): Likewise.
|
|
* config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Add
|
|
-DUSE_ELF_SYMVER.
|
|
|
|
* g++.dg/ext/mv18.C: New test.
|
|
* g++.dg/ext/mv19.C: Likewise.
|
|
* g++.dg/ext/mv20.C: Likewise.
|
|
* g++.dg/ext/mv21.C: Likewise.
|
|
* g++.dg/ext/mv22.C: Likewise.
|
|
* g++.dg/ext/mv23.C: Likewise.
|
|
|
|
Index: libgcc/config.host
|
|
===================================================================
|
|
--- libgcc/config.host (revision 222177)
|
|
+++ libgcc/config.host (revision 222178)
|
|
@@ -1306,7 +1306,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
|
|
Index: libgcc/config/i386/cpuinfo.c
|
|
===================================================================
|
|
--- libgcc/config/i386/cpuinfo.c (revision 222177)
|
|
+++ libgcc/config/i386/cpuinfo.c (revision 222178)
|
|
@@ -109,7 +109,7 @@ struct __processor_model
|
|
unsigned int __cpu_type;
|
|
unsigned int __cpu_subtype;
|
|
unsigned int __cpu_features[1];
|
|
-} __cpu_model;
|
|
+} __cpu_model = { };
|
|
|
|
|
|
/* Get the specific type of AMD CPU. */
|
|
@@ -424,3 +424,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
|
|
Index: libgcc/config/i386/t-linux
|
|
===================================================================
|
|
--- libgcc/config/i386/t-linux (revision 222177)
|
|
+++ libgcc/config/i386/t-linux (revision 222178)
|
|
@@ -3,4 +3,4 @@
|
|
# t-slibgcc-elf-ver and t-linux
|
|
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
|
|
|
|
-HOST_LIBGCC2_CFLAGS += -mlong-double-80
|
|
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
|
|
Index: gcc/testsuite/g++.dg/ext/mv20.C
|
|
===================================================================
|
|
--- gcc/testsuite/g++.dg/ext/mv20.C (nonexistent)
|
|
+++ gcc/testsuite/g++.dg/ext/mv20.C (revision 222178)
|
|
@@ -0,0 +1,7 @@
|
|
+/* Test case to check if Multiversioning works. */
|
|
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
|
+/* { dg-require-ifunc "" } */
|
|
+/* { dg-require-effective-target pie } */
|
|
+/* { dg-options "-O2 -fPIE -pie -march=x86-64" } */
|
|
+
|
|
+#include "mv15.C"
|
|
Index: gcc/testsuite/g++.dg/ext/mv21.C
|
|
===================================================================
|
|
--- gcc/testsuite/g++.dg/ext/mv21.C (nonexistent)
|
|
+++ gcc/testsuite/g++.dg/ext/mv21.C (revision 222178)
|
|
@@ -0,0 +1,7 @@
|
|
+/* Test case to check if Multiversioning works. */
|
|
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
|
+/* { dg-require-ifunc "" } */
|
|
+/* { dg-require-effective-target static } */
|
|
+/* { dg-options "-O2 -static" } */
|
|
+
|
|
+#include "mv1.C"
|
|
Index: gcc/testsuite/g++.dg/ext/mv22.C
|
|
===================================================================
|
|
--- gcc/testsuite/g++.dg/ext/mv22.C (nonexistent)
|
|
+++ gcc/testsuite/g++.dg/ext/mv22.C (revision 222178)
|
|
@@ -0,0 +1,7 @@
|
|
+/* Test case to check if Multiversioning works. */
|
|
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
|
+/* { dg-require-ifunc "" } */
|
|
+/* { dg-require-effective-target static } */
|
|
+/* { dg-options "-O2 -static -march=x86-64" } */
|
|
+
|
|
+#include "mv14.C"
|
|
Index: gcc/testsuite/g++.dg/ext/mv23.C
|
|
===================================================================
|
|
--- gcc/testsuite/g++.dg/ext/mv23.C (nonexistent)
|
|
+++ gcc/testsuite/g++.dg/ext/mv23.C (revision 222178)
|
|
@@ -0,0 +1,7 @@
|
|
+/* Test case to check if Multiversioning works. */
|
|
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
|
+/* { dg-require-ifunc "" } */
|
|
+/* { dg-require-effective-target static } */
|
|
+/* { dg-options "-O2 -static -march=x86-64" } */
|
|
+
|
|
+#include "mv15.C"
|
|
Index: gcc/testsuite/g++.dg/ext/mv18.C
|
|
===================================================================
|
|
--- gcc/testsuite/g++.dg/ext/mv18.C (nonexistent)
|
|
+++ gcc/testsuite/g++.dg/ext/mv18.C (revision 222178)
|
|
@@ -0,0 +1,7 @@
|
|
+/* Test case to check if Multiversioning works. */
|
|
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
|
+/* { dg-require-ifunc "" } */
|
|
+/* { dg-require-effective-target pie } */
|
|
+/* { dg-options "-O2 -fPIE -pie" } */
|
|
+
|
|
+#include "mv1.C"
|
|
Index: gcc/testsuite/g++.dg/ext/mv19.C
|
|
===================================================================
|
|
--- gcc/testsuite/g++.dg/ext/mv19.C (nonexistent)
|
|
+++ gcc/testsuite/g++.dg/ext/mv19.C (revision 222178)
|
|
@@ -0,0 +1,7 @@
|
|
+/* Test case to check if Multiversioning works. */
|
|
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
|
+/* { dg-require-ifunc "" } */
|
|
+/* { dg-require-effective-target pie } */
|
|
+/* { dg-options "-O2 -fPIE -pie -march=x86-64" } */
|
|
+
|
|
+#include "mv14.C"
|