1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
2 | |
2 | |
3 | use Config; |
3 | use Config; |
4 | |
4 | |
5 | $Config{ccsymbols} =~ /__i386=1/ or print <<EOF; |
5 | $Config{cppsymbols} =~ /__i386=1/ or print <<EOF; |
6 | |
6 | |
7 | WARNING: This module is architecture-dependent and currently only tested on |
7 | WARNING: This module is architecture-dependent and currently only |
8 | little-endian 32-bit architectures. If the module (esp. aio_read |
8 | tested on some architectures. If the module (esp. aio_read and |
9 | and aio_write) doesn't work, please report this and I'll fix it |
9 | aio_write) doesn't work, please report this and I'll fix it for |
10 | for you. I promise ;) |
10 | you. I promise ;) |
11 | |
11 | |
12 | EOF |
12 | EOF |
13 | |
13 | |
14 | $Config{osvers} >= 2.4 or print <<EOF; |
14 | $Config{osvers} >= 2.4 or print <<EOF; |
15 | |
15 | |
16 | WARNING: This module requires 64 bit file offset functionality only found |
16 | WARNING: This module requires 64 bit file offset functionality only found |
17 | in linux-2.4 and later You might sitll compile this module on older linuxes, |
17 | in linux-2.4 and later You might still compile this module on older linuxes, |
18 | but it won't run. |
18 | but it won't run. |
19 | |
19 | |
20 | DEVELOPERS: It is not difficult to get rid of this limitation, ask me and I'll tell |
20 | DEVELOPERS: It is not difficult to get rid of this limitation, ask me and I'll tell |
21 | you what you need to change (and test, so I can add it!). |
21 | you what you need to change (and test, so I can add it!). |
22 | |
22 | |
… | |
… | |
41 | |
41 | |
42 | EOF |
42 | EOF |
43 | } |
43 | } |
44 | |
44 | |
45 | # now get rid of -fpic, because gcc can't use syscall'ed closures |
45 | # now get rid of -fpic, because gcc can't use syscall'ed closures |
46 | # from within pic code. |
46 | # from within pic code on x86. |
|
|
47 | |
|
|
48 | use Config; |
|
|
49 | |
|
|
50 | if ($Config{cppsymbols} =~ /__i386=1/) { |
47 | for ($mm->{CCDLFLAGS}, $mm->{CCCDLFLAGS}, @{$mm->{RESULT}}) { |
51 | for ($mm->{CCDLFLAGS}, $mm->{CCCDLFLAGS}, @{$mm->{RESULT}}) { |
48 | s/\B-f(pic|PIC)\b//g |
52 | s/\B-f(pic|PIC)\b//g |
|
|
53 | } |
49 | } |
54 | } |
50 | |
55 | |
51 | $mm->flush; |
56 | $mm->flush; |
52 | |
57 | |