On Wed, Jun 28, 2017 at 03:48:50PM -0500, Segher Boessenkool wrote: > As Peter said, I'd rather test for "ppc32", so this works anywhere.
Fair enough. > That would give > > proc check_cpu_supports_available { } { > if { [istarget powerpc*-*-*] } { > return [check_runtime cpu_supports_available { > int main() { return !__builtin_cpu_supports ("ppc32"); } > }] > } > > return 0 > } > > (and other archs can add their stuff then). > > Why did you use check_runtime_nocache btw? Is that just copy-paste? Just copy-paste. Like the target_clones stuff, right now, it is only x86 and PowerPC that supports __builtin_cpu*. I don't really see the point of having a machine independent test for __builtin_cpu_*, but if you feel strongly about it go for it. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797