anchor.diff:  # pointer width, but some expect to use 32-bit integers always
   # (for compatibility with reference BLAS).
   , blas64 ? null
  +, buildPackages
   }:
   
   with stdenv.lib;
  
positive.code:     "relro" "bindnow"
    ];
  
    nativeBuildInputs =
      [gfortran perl which]
      ++ optionals stdenv.isDarwin [coreutils];
  
    makeFlags =
      [
        "FC=gfortran"
        ''PREFIX="''$(out)"''
        "NUM_THREADS=64"
        "INTERFACE64=${if blas64 then "1" else "0"}"
        "NO_STATIC=1"
      ] ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "musl") "NO_AFFINITY=1"
      ++ mapAttrsToList (var: val: var + "=" + val) config;
  
    doCheck = true;
    checkTarget = "tests";
  
    postInstall = ''
  
negative.code:       BINARY = "32";
        TARGET = "ARMV6";
        DYNAMIC_ARCH = "0";
        USE_OPENMP = "1";
      };
  
  