openmpi: re-enable fortran on aarch64-darwin

by disabling stackprotector hardening
This commit is contained in:
Pavol Rusnak 2021-06-29 11:32:13 +02:00
parent bcd6993fae
commit cca0869015
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D

View file

@ -15,7 +15,7 @@
, fabricSupport ? stdenv.isLinux && stdenv.isx86_64 , fabricSupport ? stdenv.isLinux && stdenv.isx86_64
# Enable Fortran support # Enable Fortran support
, fortranSupport ? !(stdenv.isDarwin && stdenv.isAarch64) , fortranSupport ? true
}: }:
assert !cudaSupport || cudatoolkit != null; assert !cudaSupport || cudatoolkit != null;
@ -73,6 +73,16 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
# disable stackprotector on aarch64-darwin for now
# https://github.com/NixOS/nixpkgs/issues/127608
#
# build error:
#
# /private/tmp/nix-build-openmpi-4.1.1.drv-0/ccg7QqR8.s:13:15: error: index must be an integer in range [-256, 255].
# ldr x2, [x2, ___stack_chk_guard];momd
#
hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
postInstall = '' postInstall = ''
rm -f $out/lib/*.la rm -f $out/lib/*.la
''; '';