]>
Commit | Line | Data |
---|---|---|
83a5839d AM |
1 | Author: Sergei Golovan |
2 | Description: This patch fixes FTBFS for x86_x32 architecture (x86_64 | |
3 | with 32-bit integers, longs and pointers). HiPE still doesn't work | |
4 | and probably never will. | |
5 | Last-Modified: Sun, 27 Dec 2015 12:39:07 +0300 | |
6 | ||
7 | --- a/erts/lib_src/pthread/ethread.c | |
8 | +++ b/erts/lib_src/pthread/ethread.c | |
9 | @@ -192,7 +192,7 @@ | |
10 | void | |
11 | ethr_x86_cpuid__(int *eax, int *ebx, int *ecx, int *edx) | |
12 | { | |
13 | -#if ETHR_SIZEOF_PTR == 4 | |
14 | +#if ETHR_SIZEOF_PTR == 4 && (!defined(__x86_64__) || !(__x86_64__ && __ILP32__)) | |
15 | int have_cpuid; | |
16 | /* | |
17 | * If it is possible to toggle eflags bit 21, | |
18 | @@ -219,7 +219,7 @@ | |
19 | return; | |
20 | } | |
21 | #endif | |
22 | -#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__ | |
23 | +#if ETHR_SIZEOF_PTR == 4 && (!defined(__x86_64__) || !(__x86_64__ && __ILP32__)) && defined(__PIC__) && __PIC__ | |
24 | /* | |
25 | * When position independet code is used in 32-bit mode, the B register | |
26 | * is used for storage of global offset table address, and we may not |