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