On Wed, Aug 15, 2018 at 8:00 AM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > GCC to gnerate code for On Wed, 15 Aug 2018 at 12:55, Jeffrey Walton wrote: >> >> I'm catching a SIGILL on POWER7 ppc64-le machine. I compiled the >> source with -mcpu=power8 so I could enable some builtins I may need. >> Use of the builtins is guarded at runtime. (This is the classic distro >> model, where most source code is compiled for a minimum machine but > > You haven't compiled for a minimum machine, you've compiled for POWER8 > when your minimum is POWER7. Right, that's the problem. To enable the built-in I need -mcpu=power8. My code is guarded. (I've never really understood this requirement on some platforms but not others). But I don't want GCC using the cpu I'm writing for. GCC needs to use POWER4 or so. The problem seems to be GCC conflates what I want with what it can do. They are two different things. > Maybe you want to use the target attribute: > https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html Thanks. Let me give it a try. Jeff