[g2clib] Build with -fpic on 32 bit too. Use -fpic on supported platforms over -fPIC

Orion Poplawski orion at cora.nwra.com
Tue Dec 11 21:57:28 UTC 2012


On 12/11/2012 02:41 PM, Peter Robinson wrote:
> commit 8949ba49ab66e8642a38087fd19217dabc4f117b
> Author: Peter Robinson <pbrobinson at gmail.com>
> 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 at fedoraproject.org> 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.


-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                       orion at nwra.com
Boulder, CO 80301                   http://www.nwra.com


More information about the devel mailing list