[Bug target/107727] error: multiversioning needs 'ifunc' which is not supported on this target (x86_64-w64-mingw32 target)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107727 --- Comment #3 from Andrew Pinski --- What they do is basically have the resolver always called: callq __cpu_indicator_init movl__cpu_model+12(%rip), %eax andl$1024, %eax # imm = 0x400 cmpl$1024, %eax # imm = 0x400 sete%al andb$1, %al testb $1, %al jne .LBB1_1 jmp .LBB1_2 .LBB1_1: addq$40, %rsp jmp _Z3foov.avx2# TAILCALL .LBB1_2: nop addq$40, %rsp jmp _Z3foov # TAILCALL Not the fastest way of implementing this either. A faster way to caching the result of the resolver. Anyways we currently don't support multiversioning for non-ifuncs supported targets. Someone will need to program up that support but it might be years unless you pay someone to do it.
[Bug target/107727] error: multiversioning needs 'ifunc' which is not supported on this target (x86_64-w64-mingw32 target)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107727 --- Comment #2 from cqwrteur --- BTW. how could i detect this feature being available? I think #if __has_cpp_attribute(__gnu__::__target__) #endif should not be true on targets that do not support it.
[Bug target/107727] error: multiversioning needs 'ifunc' which is not supported on this target (x86_64-w64-mingw32 target)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107727 --- Comment #1 from cqwrteur --- Here is how clang deals with it on x86_64-windows-gnu (it is how clang calls x86_64-w64-mingw32) https://godbolt.org/z/z5cexGEMK