[gdal] Tweak -fpic CFLAGS to fix FTBFS on ARM

Peter Robinson pbrobinson at fedoraproject.org
Thu Dec 13 19:05:19 UTC 2012


commit bba28d9ad895d8f0138739a6a55958530765db3e
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Thu Dec 13 19:04:53 2012 +0000

    Tweak -fpic CFLAGS to fix FTBFS on ARM

 gdal.spec |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gdal.spec b/gdal.spec
index 14ca1fc..d096a31 100644
--- a/gdal.spec
+++ b/gdal.spec
@@ -30,7 +30,7 @@
 
 Name:      gdal
 Version:   1.9.1
-Release:   13%{?dist}
+Release:   14%{?dist}
 Summary:   GIS file format library
 Group:     System Environment/Libraries
 License:   MIT
@@ -384,7 +384,13 @@ sed -i 's|#CHARLS_LIB = -L/path/to/charls_lib -lCharLS|CHARLS_LIB = -lCharLS|' G
 
 %build
 #TODO: Couldn't I have modified that in the prep section?
-export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff -fPIC"
+%ifarch sparcv9 sparc64 s390 s390x
+export CFLAGS="$RPM_OPT_FLAGS -fPIC"
+%else
+export CFLAGS="$RPM_OPT_FLAGS -fpic"
+%endif
+export CXXFLAGS="$CFLAGS -I%{_includedir}/libgeotiff"
+export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff"
 
 # For future reference:
 # epsilon: Stalled review -- https://bugzilla.redhat.com/show_bug.cgi?id=660024
@@ -795,6 +801,9 @@ rm -rf %{buildroot}
 #Or as before, using ldconfig
 
 %changelog
+* Thu Dec 13 2012 Peter Robinson <pbrobinson at fedoraproject.org> 1.9.1-14
+- Tweak -fpic CFLAGS to fix FTBFS on ARM
+
 * Mon Dec  3 2012 Orion Poplawski <orion at cora.nwra.com> - 1.9.1-13
 - Rebuild for hdf5 1.8.10
 


More information about the scm-commits mailing list