$ cat /etc redhat-release Red Hat Linux release 6.2 (Zoot) $ uname -a Linux sparc-os 2.2.14-5.0 #1 Mon Jul 17 14:02:06 EDT 2000 sparc64 unknown $ rpm --version RPM version 3.0.4 RPM is from package rpm-3.0.4-0.48. I'm trying to build the gcc-2.96 RPM from Rawhide. I have copied the spec file and source files to the appropriate places. If I run rpm -bp gcc.spec, patches in an ifarch sparc clause are not applied. To investigate, I added the following to the spec file in the patches section: echo $RPM_ARCH %ifarch sparc echo "Its a sparc" %endif %ifnarch sparc echo "Its not a sparc" %endif Running rpm -bp on the spec file gives the following output fragment. sparc Its not a sparc This doesn't seem right.
Both sparc and sparc64 are distinguished (and therfore exclusive) architectures for rpm purposes. What you need to do is prefix your build command thusly sparc32 rpm -ba ... if you wish to produce sparc packages on a sparc64.