--- etherboot.spec 2008-10-02 15:14:43.000000000 -0300 +++ /home/ehabkost/rpm/SPECS/etherboot.spec 2008-10-02 15:09:17.000000000 -0300 @@ -6,7 +6,7 @@ Name: etherboot Version: 5.4.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Etherboot collection of boot roms Group: Development/Tools @@ -17,7 +17,6 @@ # prebuilt binaries, from etherboot-*-5.4.4-3.fc10.i386.rpm: Source1: etherboot-binaries-5.4.4-3.fc10.i386.tar.bz2 -Patch1: etherboot-build-properly-on-x86_64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %ifarch %{real_build_arches} @@ -77,7 +76,6 @@ %prep %setup -q -%patch1 -p1 %ifnarch %{real_build_arches} # can't build the images on this arch. extract the prebuilt ones: @@ -91,19 +89,24 @@ %ifarch %{real_build_arches} -%ifnarch x86_64 -# %{optflags} won't work with our hack to build the 32-bit binaries -# on x86_64 -%define extra_flags EXTRA_CFLAGS="`echo %{optflags} |sed 's|-fstack-protector||g'`" +# %{optflags} wouldn't work with our hack to build the 32-bit binaries +# on x86_64, so use %{__global_cflags} instead, that doesn't include +# -m64 & related flags +%define extra_cflags `echo %{__global_cflags} |sed 's|-fstack-protector||g'` + +%ifarch x86_64 +# flags needed to build the 32-bit binaries on x86_64 +%define makeflags ARCH=i386 EXTRA_CFLAGS="%{extra_cflags} -m32" EXTRA_ASFLAGS="--32" EXTRA_LDFLAGS="-m elf_i386" %else -%define extra_flags %{nil} +%define makeflags EXTRA_CFLAGS="%{extra_cflags}" %endif # undi is broken by now sed -i -e '/undi/d' Families -make %{?_smp_mflags} allpxes allroms %{extra_flags} +make %{?_smp_mflags} allpxes allroms %{makeflags} %else +# Simply copy the prebuilt binaries: cp prebuilt/etherboot/* bin/ %endif @@ -143,6 +146,11 @@ %changelog +* Thu Oct 02 2008 Eduardo Habkost - 5.4.4-4 +- Use __global_cflags instead of optflags to allow building on x86_64 +- Move the x86_64 build hack to %%build on the spec file, instead of + a patch + * Tue Sep 30 2008 Eduardo Habkost - 5.4.4-3 - Use Fedora optflags when building