Set FCFLAGS

This commit is contained in:
sagitter 2020-06-04 12:05:41 +02:00
parent 9d99770e02
commit 6c55a29a54

View File

@ -45,7 +45,7 @@
#
## Suitesparse
## Currently, that's the 5.4.0 on Fedora 32+, this version of PETSc needs at least 5.6.0
## Currently, suitesparse-5.4.0 is available on Fedora 32+, but this version of PETSc needs at least 5.6.0
%bcond_with suitesparse
%if 0%{?fedora} && 0%{?fedora} >= 32
%bcond_with suitesparse64
@ -92,9 +92,11 @@
%if %{with debug} \
CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \\\
CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -I%{_libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -fPIC" \\\
FCFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{_libdir}/gfortran/modules" \\\
%else \
CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \\\
COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \\\
FCFLAGS="$FFLAGS -O3 -fPIC" \\\
%endif \
--CC_LINKER_FLAGS="$LDFLAGS" \\\
--FC_LINKER_FLAGS="$LDFLAGS -lgfortran" \\\
@ -156,9 +158,11 @@
%if %{with debug} \
CFLAGS="-O0 -g -Wl,-z,now -fPIC" CXXFLAGS="-O0 -g -Wl,-z,now -fPIC" FFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" COPTFLAGS="-O0 -g -Wl,-z,now" \\\
CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -I${MPI_FORTRAN_MOD_DIR}" LDFLAGS="$LDFLAGS -fPIC" \\\
FCFLAGS="-O0 -g -Wl,-z,now -fPIC -I${MPI_FORTRAN_MOD_DIR}" \\\
%else \
CFLAGS="$CFLAGS -O3 -fPIC" CXXFLAGS="$CXXFLAGS -O3 -fPIC" FFLAGS="$FFLAGS -O3 -fPIC" LDFLAGS="$LDFLAGS -fPIC" \\\
COPTFLAGS="$CFLAGS" CXXOPTFLAGS="$CXXFLAGS" FOPTFLAGS="$FFLAGS" \\\
FCFLAGS="$FFLAGS -O3 -fPIC" \\\
%endif \
--CC_LINKER_FLAGS="$LDFLAGS" \\\
--with-default-arch=0 --with-make=1 \\\
@ -555,6 +559,7 @@ pushd %{name}-%{version}
--with-suitesparse-include=%{_includedir}/suitesparse \
--with-suitesparse-lib="-lumfpack -lklu -lcholmod -lamd"
%endif
#cat config.log && exit 1
##
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"