Re: Check for command line option in my header file

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

 



On 18 July 2016 at 03:09, greg7mdp 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.

The instruction can be enabled without the -mpopcnt option, e.g.
-march=nehalem or -march=skylake etc. should enable it. So testing for
an explicit command-line option is the wrong thing to do. Testing for
the instruction being enabled (however it got enabled) is the right
thing to do, and that's what the macro does.



[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