From 9617ef11e174d85b5ab2a7bdf99e7863fa78c2b2 Mon Sep 17 00:00:00 2001 From: sagitter Date: Sun, 1 Oct 2017 16:55:11 +0200 Subject: [PATCH] Rebuild for debugging --- petsc.spec | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/petsc.spec b/petsc.spec index c65d692..1be6c40 100644 --- a/petsc.spec +++ b/petsc.spec @@ -5,7 +5,7 @@ %bcond_without check ## Debug builds ? -%bcond_with debug +%bcond_without debug # # Define _pkgdocdir macro on epel @@ -110,7 +110,7 @@ Name: petsc Summary: Portable Extensible Toolkit for Scientific Computation Version: 3.7.7 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD URL: https://www.mcs.anl.gov/petsc Source0: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-%{version}.tar.gz @@ -379,8 +379,14 @@ cp -a %{name}-%{version} buildmpich_dir %build pushd %{name}-%{version} -%configure CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%configure \ +%if %{with debug} +CFLAGS="-O0 -g -Wl,-z,now" CXXFLAGS="-O0 -g -Wl,-z,now" FFLAGS="-O0 -g -Wl,-z,now -I%{libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \ + CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%else +CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ COPTFLAGS="$COPTFLAGS" CXXOPTFLAGS="$CXXOPTFLAGS" FOPTFLAGS="$FOPTFLAGS -Wl,-z,now -fPIC" \ +%endif --with-default-arch=0 --with-make=1 \ --with-single-library=1 \ --with-precision=double \ @@ -453,8 +459,14 @@ popd %if %{with arch64} pushd build64 -%configure CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%configure \ +%if %{with debug} +CFLAGS="-O0 -g -Wl,-z,now" CXXFLAGS="-O0 -g -Wl,-z,now" FFLAGS="-O0 -g -Wl,-z,now -I%{libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \ + CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%else +CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ COPTFLAGS="$COPTFLAGS" CXXOPTFLAGS="$CXXOPTFLAGS" FOPTFLAGS="$FOPTFLAGS -Wl,-z,now -fPIC" \ +%endif --with-default-arch=0 --with-make=1 \ --with-single-library=1 \ --with-precision=double \ @@ -509,8 +521,14 @@ popd %if %{with openmpi} pushd buildopenmpi_dir %{_openmpi_load} -%configure CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%configure \ +%if %{with debug} +CFLAGS="-O0 -g -Wl,-z,now" CXXFLAGS="-O0 -g -Wl,-z,now" FFLAGS="-O0 -g -Wl,-z,now -I%{libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \ + CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%else +CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ COPTFLAGS="$COPTFLAGS" CXXOPTFLAGS="$CXXOPTFLAGS" FOPTFLAGS="$FOPTFLAGS -Wl,-z,now -fPIC" \ +%endif --with-default-arch=0 --with-make=1 \ --with-single-library=1 \ --with-precision=double \ @@ -615,8 +633,14 @@ popd %if %{with mpich} pushd buildmpich_dir %{_mpich_load} -%configure CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%configure \ +%if %{with debug} +CFLAGS="-O0 -g -Wl,-z,now" CXXFLAGS="-O0 -g -Wl,-z,now" FFLAGS="-O0 -g -Wl,-z,now -I%{libdir}/gfortran/modules" COPTFLAGS="-O0 -g -Wl,-z,now" \ + CXXOPTFLAGS="-O0 -g -Wl,-z,now" FOPTFLAGS="-O0 -g -Wl,-z,now -fPIC -I%{libdir}/gfortran/modules" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ +%else +CFLAGS="$CFLAGS -O3 -Wl,-z,now" CXXFLAGS="$CXXFLAGS -O3" FFLAGS="$FFLAGS -O3 -Wl,-z,now" LDFLAGS="$LDFLAGS -Wl,-z,now -fPIC" \ COPTFLAGS="$COPTFLAGS" CXXOPTFLAGS="$CXXOPTFLAGS" FOPTFLAGS="$FOPTFLAGS -Wl,-z,now -fPIC" \ +%endif --with-default-arch=0 --with-make=1 \ --with-single-library=1 \ --with-precision=double \ @@ -988,6 +1012,9 @@ make -C buildmpich_dir test %endif %changelog +* Sun Oct 01 2017 Antonio Trande - 3.7.7-4 +- Rebuild for debugging + * Sun Oct 01 2017 Antonio Trande - 3.7.7-3 - Exclude MPI builds on s390x