On Wed, Jun 6, 2012 at 6:52 AM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Tue, Jun 5, 2012 at 3:00 PM, Sriraman Tallam <tmsri...@google.com> wrote: >> Hi H.J., >> >> I am attaching a patch to add __cpu_indicator_init to the list of >> symbols to be versioned and exported in libgcc_s.so. Also, updating >> builtin_target.c test to explicitly do a CPUID and check if the >> features are identified correctly like you had suggested earlier. >> >> Patch ok? >> >> >> * config/i386/libgcc-bsd.ver: Version symbol __cpu_indicator_init. >> * config/i386/libgcc-sol2.ver: Ditto. >> * config/i386/libgcc-glibc.ver: Ditto. >> >> >> * gcc.target/i386/builtin_target.c (vendor_signatures): New enum. >> (check_intel_cpu_model): New function. >> (check_amd_cpu_model): New function. >> (check_features): New function. >> (__get_cpuid_output): New function. >> (check_detailed): New function. >> (fn1): Rename to quick_check. >> (main): Update to call quick_check and call check_detailed. >> > > It looks good.
I submitted this patch. I am working on fixing the problem mentioned below about cpu indicator symbols from libgcc_s.so being used in C programs. Thanks, -Sri. The only problem is for C programs, __cpu_model and > __cpu_indicator_init in libgcc_s.so aren't used at all. I suggested > in > > http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01816.html > > We can do one > of 3 things: > > 1. Abuse libgcc_eh.a by moving __cpu_model and __cpu_indicator_init > from libgcc.a to libgcc_eh.a. > 2. Rename libgcc_eh.a to libgcc_static.a and move __cpu_model and > __cpu_indicator_init from libgcc.a to libgcc_static.a. > 3. Add libgcc_static.a and move __cpu_model and __cpu_indicator_ini > from libgcc.a to libgcc_static.a. We treat libgcc_static.a similar to > libgcc_eh.a. > > > -- > H.J.