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 |
7 | WARNING: This module is architecture-dependent and currently only |
8 | tested on some architectures. If the module (esp. aio_read and |
8 | tested on some architectures. If the module (esp. aio_read and |
9 | aio_write) doesn't work, please report this and I'll fix it for |
9 | aio_write) doesn't work, please report this and I'll fix it for |
10 | you. I promise ;) |
10 | you. I promise ;) |
… | |
… | |
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 on x86. |
46 | # from within pic code on x86. |
47 | |
47 | |
48 | use Config; |
48 | use Config; |
49 | |
49 | |
50 | if ($Config{archname} =~ /i[x34567]86/) { |
50 | if ($Config{cppsymbols} =~ /__i386=1/) { |
51 | for ($mm->{CCDLFLAGS}, $mm->{CCCDLFLAGS}, @{$mm->{RESULT}}) { |
51 | for ($mm->{CCDLFLAGS}, $mm->{CCCDLFLAGS}, @{$mm->{RESULT}}) { |
52 | s/\B-f(pic|PIC)\b//g |
52 | s/\B-f(pic|PIC)\b//g |
53 | } |
53 | } |
54 | } |
54 | } |
55 | |
55 | |