https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100347

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #7)
> (In reply to Iru Cai from comment #6)
> > I've checked host_detect_local_cpu() in gcc/config/i386/driver-i386.c. GCC
> > detects x86 host CPU micro architecture by cpuid instruction instead of the
> > APIs provided by the OS.
> 
> But there shouldn't have been any functional changes in the code 10.x vs.
> 11.x
> 
> Erik - does GCC 10.3 actually still work?  Thus, isn't it maybe some OS
> restriction on CPUID access, maybe a difference in whether the GCC binaries
> are signed or not?
> 
> I wonder if you can try
> 
> int main()
> {
>   __builtin_cpu_init ();
>   return __builtin_cpu_is ("skylake");
> }
> 
> with both compilers?

I recently went through the exercise of finding out what -march=native reported
for me across the machines I use for testing - AFAIR the Xeon W reported
cascadelake, and corei7s reported skyline, ivybridge or haswell.  I will need
to recheck.  

Are you on Darwin20 / macOS11 .. it seems that Apple are gradually trying to
tie things down more in line with iOS - however, I have not seen too much of
that on x86_64 - more on the Arm64 side.

I'll need a few days to check this out.

Reply via email to