This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE


On Fri, Apr 17, 2015 at 1:05 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Thu, Apr 16, 2015 at 6:28 PM, Mike Stump <mikestump@comcast.net> wrote:
>> On Apr 14, 2015, at 8:07 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>> I can confirm that the most current patch bootstraps on
>>>> x86_64-apple-darwin14 and that all of the new tests show up as
>>>> unsupported in the test suite.
>>>>          Jack
>>>
>>> I am re-posting this patch.  OK for trunk?
>>
>> If Jack is happy, Iâm happy.  :-)  That leaves the x86 people to comment on it.
>
> What about Solaris?
>
> Uros.

There are

diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index eaf2f10..f6f91dd 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -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
diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
index 4f47f7b..11bb46e 100644
--- a/libgcc/config/i386/t-linux
+++ b/libgcc/config/i386/t-linux
@@ -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

USE_ELF_SYMVER is only defined for Linux.  This patch won't
break Solaris.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]