On Tue, Dec 11, 2012 at 9:57 PM, Orion Poplawski <orion@xxxxxxxxxxxxx> wrote: > On 12/11/2012 02:41 PM, Peter Robinson wrote: >> >> commit 8949ba49ab66e8642a38087fd19217dabc4f117b >> Author: Peter Robinson <pbrobinson@xxxxxxxxx> >> Date: Tue Dec 11 21:40:52 2012 +0000 >> >> Build with -fpic on 32 bit too. Use -fpic on supported platforms over >> -fPIC >> >> g2clib.spec | 15 +++++++++++++-- >> 1 files changed, 13 insertions(+), 2 deletions(-) >> --- >> diff --git a/g2clib.spec b/g2clib.spec >> index a00c138..607d095 100644 >> --- a/g2clib.spec >> +++ b/g2clib.spec >> @@ -1,6 +1,6 @@ >> Name: g2clib >> Version: 1.4.0 >> -Release: 1%{?dist} >> +Release: 2%{?dist} >> Summary: GRIB2 encoder/decoder and search/indexing routines in C >> >> Group: System Environment/Libraries >> @@ -49,9 +49,17 @@ cp -p %{SOURCE1} . >> >> %build >> CFLAGS="$RPM_OPT_FLAGS -DUSE_PNG -DUSE_JPEG2000" >> -%ifarch x86_64 ia64 s390x ppc64 >> + >> +%ifarch sparc64 s390x >> CFLAGS="$CFLAGS -D__64BIT__ -fPIC" >> %endif >> +%ifarch x86_64 ia64 ppc64 >> +CFLAGS="$CFLAGS -D__64BIT__ -fpic" >> +%endif >> +%ifarch %{ix86} %{arm} >> +CFLAGS="$CFLAGS -fpic" >> +%endif >> + >> make CFLAGS="$CFLAGS" CC="%{__cc}" ARFLAGS= >> >> >> @@ -80,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT >> >> >> %changelog >> +* Tue Dec 11 2012 Peter Robinson <pbrobinson@xxxxxxxxxxxxxxxxx> 1.4.0-2 >> +- Build with -fpic on 32 bit too. Use -fpic on supported platforms over >> -fPIC >> + > > > So, is this the standard now? -fpic over -fPIC and-fpic on 32-bit as well? > I'm interested to learn more about this. No, it's apparently faster on some architectures but if you're enabling it on 64 bit you should on 32 bit as well. Peter -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel