Paolo Bonzini <bonz...@gnu.org> writes:

>> 2012-04-26  Rainer Orth  <r...@cebitec.uni-bielefeld.de>
>> 
>>      libgcc:
>>      * config.host (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*): Move
>>      i386/t-cpuinfo ...
>>      (i[34567]86-*-*, x86_64-*-*): ... here.
>> 
>>      * config/i386/libgcc-bsd.ver (GCC_4.8.0): New version.
>>      * config/i386/libgcc-sol2.ver (GCC_4.8.0): New version.
>> 
>>      * config/i386/i386-cpuinfo.c: Rename to ...
>>      * config/i386/cpuinfo.c: ... this.
>>      * config/i386/t-cpuinfo (LIB2ADD): Reflect this.
>> 
>>      * configure.ac (AC_CONFIG_HEADER): Call for auto-target.h.
>>      (libgcc_cv_init_priority): New test.
>>      * configure: Regenerate.
>>      * config.in: New file.
>>      * Makefile.in (clean): Rename config.h to auto-target.h.
>>      (config.h): Likewise.
>>      (stamp-h): Likewise.
>> 
>>      * config/i386/cpuinfo.c (auto-target.h): Include.
>>      (CONSTRUCTOR_PRIORITY): Define.
>>      (__cpu_indicator_init): Use it.
>> 
>>      gcc
>>      * config/i386/i386.c: Update comments for i386-cpuinfo.c name
>>         change.
>> 
>
> Looks good.

Given that there were no further comments, I've committed the patch
with the following doc snippet added, after bootstrapping on
i386-pc-solaris2.10 with as and x86_64-unknown-linux-gnu.

Thanks.
        Rainer


        * doc/extend.texi (X86 Built-in Functions, __builtin_cpu_init):
        Document requirement to call in constructors.

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -9432,8 +9432,9 @@ executed before any constructors are cal
 automatically executed in a very high priority constructor.
 
 For example, this function has to be used in @code{ifunc} resolvers which
-check for CPU type using the builtins, @code{__builtin_cpu_is}
-and @code{__builtin_cpu_supports}.
+check for CPU type using the builtins @code{__builtin_cpu_is}
+and @code{__builtin_cpu_supports}, or in constructors on targets which
+don't support constructor priority.
 @smallexample
 
 static void (*resolve_memcpy (void)) (void)


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to