--- Linux-AIO/Makefile.PL 2001/08/14 04:32:19 1.2 +++ Linux-AIO/Makefile.PL 2005/08/25 06:04:11 1.9 @@ -1,5 +1,27 @@ use ExtUtils::MakeMaker; +use Config; + +print <= 2.4 or print <new({ dist => { PREOP => 'pod2text AIO.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', @@ -15,15 +37,25 @@ # set \$VERSION in all modules setver: - \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm + \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm EOF } # now get rid of -fpic, because gcc can't use syscall'ed closures -# from within pic code. -for ($mm->{CCDLFLAGS}, $mm->{CCCDLFLAGS}, @{$mm->{RESULT}}) { - s/\B-f(pic|PIC)\b//g +# from within pic code on x86. + +use Config; + +if ($Config{cppsymbols} =~ /__i386=1/) { + for ($mm->{CCDLFLAGS}, $mm->{CCCDLFLAGS}, @{$mm->{RESULT}}) { + s/\B-f(pic|PIC)\b//g + } + + # Put -O at the front so as not to change any existing optimisation level + # Need optimization of some form turned on to inline syscall() so that it + # sets the local errno + $mm->{OPTIMIZE} = '-O ' . $mm->{OPTIMIZE}; } $mm->flush;