forked from rarias/bscpkgs
Default architecture 'auto', and name correctly the libraries ('-mt' suffix)
This commit is contained in:
parent
af955ca345
commit
7ec5d4922d
@ -8,8 +8,9 @@
|
||||
# Enable BLAS interface with 64-bit integer width.
|
||||
blasIntSize ? "64",
|
||||
|
||||
# Target architecture. x86_64 builds Intel and AMD kernels.
|
||||
withArchitecture ? "x86_64",
|
||||
# Target architecture. "auto" lets the script decide for itself.
|
||||
# For fox, "zen4" should be used.
|
||||
withArchitecture ? "auto",
|
||||
|
||||
# Enable OpenMP-based threading.
|
||||
withOpenMP ? true,
|
||||
@ -22,6 +23,8 @@
|
||||
|
||||
assert lib.assertOneOf "blasIntSize" blasIntSize ["32" "64"];
|
||||
let
|
||||
threadingSuffix = lib.optionalString withOpenMP "-mt";
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
@ -49,15 +52,16 @@ in
|
||||
"--blas-int-size=${blasIntSize}"
|
||||
]
|
||||
++ lib.optionals withOpenMP [ "--enable-threading=openmp" ]
|
||||
++ [ "auto" ];
|
||||
++ [ withArchitecture ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs configure build/flatten-headers.py
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/lib/libblis.so.4 $out/lib/libblas.so.3
|
||||
ln -s $out/lib/libblis.so.4 $out/lib/libcblas.so.3
|
||||
ls $out/lib
|
||||
ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libblas.so.3
|
||||
ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libcblas.so.3
|
||||
ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
|
||||
ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
|
||||
'';
|
Loading…
x
Reference in New Issue
Block a user