Joey Hess wrote: > int cpu_has_rdrand() > { > uint32_t ax,bx,cx,dx,func=1; > __asm__ volatile ("cpuid":\ > "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func)); > return (cx & 0x40000000); > }
That's actually buggy on any platform building position-independent code (common with hardened build flags). PIC uses ebx, and that would conflict with this code, resulting in a compile failure. GCC provides a <cpuid.h> with a __get_cpuid function that avoids that problem. - Josh Triplett -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140613191608.GA3593@jtriplet-mobl1