Merge pull request #92412 from matthewbauer/blas-cross
Blas/Lapack cross fixes
This commit is contained in:
commit
d59c57f8a6
|
@ -70,7 +70,7 @@ stdenv.mkDerivation {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
nm -an "$libblas" | cut -f3 -d' ' > symbols
|
||||
$NM -an "$libblas" | cut -f3 -d' ' > symbols
|
||||
for symbol in ${toString blasFortranSymbols}; do
|
||||
grep -q "^$symbol_$" symbols || { echo "$symbol" was not found in "$libblas"; exit 1; }
|
||||
done
|
||||
|
|
|
@ -209,6 +209,7 @@ stdenv.mkDerivation {
|
|||
wrap ${targetPrefix}gfortran $wrapper $ccPath/${targetPrefix}gfortran
|
||||
ln -sv ${targetPrefix}gfortran $out/bin/${targetPrefix}g77
|
||||
ln -sv ${targetPrefix}gfortran $out/bin/${targetPrefix}f77
|
||||
export named_fc=${targetPrefix}gfortran
|
||||
''
|
||||
|
||||
+ optionalString cc.langJava or false ''
|
||||
|
@ -227,8 +228,8 @@ stdenv.mkDerivation {
|
|||
|
||||
setupHooks = [
|
||||
../setup-hooks/role.bash
|
||||
./setup-hook.sh
|
||||
];
|
||||
] ++ stdenv.lib.optional (cc.langC or true) ./setup-hook.sh
|
||||
++ stdenv.lib.optional (cc.langFortran or false) ./fortran-hook.sh;
|
||||
|
||||
postFixup =
|
||||
# Ensure flags files exists, as some other programs cat them. (That these
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
getTargetRole
|
||||
getTargetRoleWrapper
|
||||
|
||||
export FC${role_post}=@named_fc@
|
||||
|
||||
# If unset, assume the default hardening flags.
|
||||
# These are different for fortran.
|
||||
: ${NIX_HARDENING_ENABLE="stackprotector pic strictoverflow relro bindnow"}
|
||||
export NIX_HARDENING_ENABLE
|
||||
|
||||
unset -v role_post
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation {
|
|||
];
|
||||
|
||||
preCheck = if stdenv.isDarwin then ''
|
||||
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib
|
||||
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib:${blas}/lib:${lapack}/lib
|
||||
'' else ''
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/lib
|
||||
'' + ''
|
||||
|
|
Loading…
Reference in New Issue