Author: gb
Date: Mon Dec 4 09:12:40 2006
New Revision: 90324
Modified:
packages/cooker/zlib/current/SPECS/zlib.spec
Log:
fix bi-arch builds with different -m32/-m64 optflags
Modified: packages/cooker/zlib/current/SPECS/zlib.spec
==============================================================================
--- packages/cooker/zlib/current/SPECS/zlib.spec (original)
+++ packages/cooker/zlib/current/SPECS/zlib.spec Mon Dec 4 09:12:40 2006
@@ -1,6 +1,6 @@
%define name zlib
%define version 1.2.3
-%define release %mkrel 3
+%define release %mkrel 4
%define lib_major 1
%define lib_name %{name}%{lib_major}
@@ -21,6 +21,7 @@
#Patch3: zlib-1.1.4-gzprintf.patch.bz2
Patch4: zlib-1.2.1.1-deb-alt-inflate.patch
#Patch5: zlib-1.2.2.2-CAN-2005-2096.patch
+BuildRequires: setarch
Group: System/Libraries
URL: http://www.gzip.org/zlib/
License: BSD
@@ -83,12 +84,10 @@
popd
%if %{build_biarch}
-%ifarch sparc64
-RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m64//g; s/-m32//g;
s/-mcpu=ultrasparc/-mtune=ultrasparc/g'`
-%endif
+RPM_OPT_FLAGS_32=`linux32 rpm --eval %%optflags`
mkdir objs32
pushd objs32
- CFLAGS="$RPM_OPT_FLAGS" CC="%{__cc} -m32" \
+ CFLAGS="$RPM_OPT_FLAGS_32" CC="%{__cc} -m32" \
../configure --shared --prefix=%{_prefix}
%make
make test