[packages/hdf] - add -fallow-argument-mismatch to fix Fortran build with gcc 10

qboosh qboosh at pld-linux.org
Thu Nov 12 21:51:19 CET 2020


commit 255f079ac2da59d068148ae9c678827583d128ce
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Nov 12 21:47:56 2020 +0100

    - 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}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hdf.git/commitdiff/0d99c692dcdc393459c6bb5f2a009ec460094ed2



More information about the pld-cvs-commit mailing list