Support shared library build

svn path=/nixpkgs/trunk/; revision=33612
This commit is contained in:
Michael Raskin 2012-04-05 12:18:08 +00:00
parent 78d9ee096a
commit 2f97078c96

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gfortran, tolerateCpuTimingInaccuracy ? true }:
{ stdenv, fetchurl, gfortran, tolerateCpuTimingInaccuracy ? true, shared ? false }:
let
optionalString = stdenv.lib.optionalString;
@ -25,7 +25,9 @@ stdenv.mkDerivation {
# machine in the first place.
configureFlags = "-Fa alg -fPIC"
+ optionalString stdenv.isi686 " -b 32"
+ optionalString tolerateCpuTimingInaccuracy " -Si cputhrchk 0";
+ optionalString tolerateCpuTimingInaccuracy " -Si cputhrchk 0"
+ optionalString shared " --shared "
;
buildInputs = [ gfortran ];