Re: Check for command line option in my header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 17, 2016 at 10:09 PM, greg7mdp <greg7mdp@xxxxxxxxx> wrote:
> Thanks. However that's exactly what it appears to do, i.e. when I compile
> with the option -mpopcnt, the macro __POPCNT__ is defined, but is not
> defined when the option is not given.
> That's exactly what I was looking for! Thanks again.

-march=native can be used to enable it *if* its a native CPU feature.
It does not depend on the user adding (or not adding) -mpopcnt.

You can see all (most?) of the defines for a particular CPU feature with:

   gcc -march=native -dM -E - </dev/null

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux