fix gcc-4.0 apple 32-bit build

gcc-4.0 defines __PIC__ but not __pic__. This leaves the test for
__pic__ should the inverse case exist.
Fixes issue #103; build failing with:
"error: can't find a register in class 'BREG' while reloading 'asm'"

Change-Id: Ia767a733de6ce0294146f9477ff9c46f0ebe13b0
This commit is contained in:
James Zern 2012-01-17 15:53:45 -08:00
parent 241ddd38e2
commit e4e3ec19ad

View File

@ -21,7 +21,8 @@ extern "C" {
// SSE2 detection.
//
#if defined(__pic__) && defined(__i386__)
// apple/darwin gcc-4.0.1 defines __PIC__, but not __pic__ with -fPIC.
#if (defined(__pic__) || defined(__PIC__)) && defined(__i386__)
static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
__asm__ volatile (
"mov %%ebx, %%edi\n"