Merge pull request #146924 from veprbl/pr/cernlib_gcc10_fix

cernlib: fix for gfortran10
This commit is contained in:
Dmitry Kalinkin 2021-11-21 20:19:21 -05:00 committed by GitHub
commit 078663458a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,18 +35,30 @@ stdenv.mkDerivation rec {
export PATH=$PATH:$CERN_ROOT/bin
'';
FFLAGS = lib.optionals (lib.versionAtLeast gfortran.version "10.0.0") [
# Fix https://github.com/vmc-project/geant3/issues/17
"-fallow-invalid-boz"
# Fix for gfortran 10
"-fallow-argument-mismatch"
];
makeFlags = [
"FORTRANOPTIONS=$(FFLAGS)"
];
buildPhase = ''
cd $CERN_ROOT
mkdir -p build bin lib
cd $CERN_ROOT/build
$CVSCOSRC/config/imake_boot
make -j $NIX_BUILD_CORES bin/kuipc
make -j $NIX_BUILD_CORES scripts/Makefile
make -j $NIX_BUILD_CORES $makeFlags bin/kuipc
make -j $NIX_BUILD_CORES $makeFlags scripts/Makefile
pushd scripts
make -j $NIX_BUILD_CORES install.bin
make -j $NIX_BUILD_CORES $makeFlags install.bin
popd
make -j $NIX_BUILD_CORES
make -j $NIX_BUILD_CORES $makeFlags
'';
installPhase = ''