From 255f079ac2da59d068148ae9c678827583d128ce Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 12 Nov 2020 21:47:56 +0100 Subject: [PATCH] - add -fallow-argument-mismatch to fix Fortran build with gcc 10 --- hdf.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hdf.spec b/hdf.spec index 8fd82d6..7760888 100644 --- a/hdf.spec +++ b/hdf.spec @@ -29,6 +29,7 @@ BuildRequires: groff BuildRequires: libjpeg-devel >= 6b BuildRequires: libtirpc-devel BuildRequires: libtool >= 2:1.4d-3 +BuildRequires: rpmbuild(macros) >= 1.750 %{?with_szip:BuildRequires: szip-devel >= 2.0} BuildRequires: which BuildRequires: zlib-devel >= 1.1.4 @@ -124,11 +125,15 @@ Przykładowe programy dla biblioteki HDF (w postaci źródłowej). %{__autoheader} %{__automake} # need to pass F77 to override F77=g77 in config/linux-gnu -%configure \ %ifarch x32 - F77="x86_64-pld-linux-gnux32-gfortran" \ +%define gfortran x86_64-pld-linux-gnux32-gfortran %else - F77="%{_target_cpu}-pld-linux-gfortran" \ +%define gfortran %{_target_cpu}-pld-linux-gfortran +%endif +%configure \ + F77="%{gfortran}" \ +%if "%{_ver_ge '%(%{gfortran} -dumpversion)' '10.0'}" == "1" + FFLAGS="%{rpmcflags} -fallow-argument-mismatch" \ %endif --enable-shared \ %{?with_szip:--with-szlib} -- 2.44.0