These two patches enable building the rawhide rpm package on ARM platforms. The issues addressed are: 1. On ARM platforms, we need a slight tweak to config.guess to be able to detect ARM EABI platforms. This patch was submitted to the upstream rpm project recently as part of a larger ARM patch, and while almost all of that patch was merged into 4.4.2.1-rc1, this particular hunk for some reason wasn't. 2. On ARM EABI platforms, we want %{_gnu} to expand to "-gnueabi" (since building for EABI is signaled to binutils/gcc/glibc/etc by configuring with a target triple that ends in -gnueabi.) The attached patch does a blunt s/-gnu$/%{_gnu}/ over macros.in at prep time, which fixes it, but this might not be the cleanest method. Ideas welcome. These patches allow building the rawhide rpm package on the arm platform. Please considering applying them. Thanks for your time.
Created attachment 158570 [details] Spec file diff for ARM.
Created attachment 158571 [details] ARM config.guess tweak.
Ah.. the reason why config.guess tweak didn't get applied is that it's not version controlled but is inherited from system libtool at build. I can carry the config.guess patch temporarily in rawhide but the proper fix is to get the config.guess tweak to libtool itself. The s/-gnu$/%{_gnu}/ hack doesn't look right to me as it basically creates a cyclic %_gnu definition. A better fix might be to figure it out in configure.ac and make macros.in have something like %_gnu @RPMCANONGNU@ ?
Created attachment 159729 [details] Implement RPMCANONGNU. Thanks for your comments! This patch implements your RPMCANONGNU suggestion -- how does it look? It seems to do the trick for me on ARM, and doesn't seem to break x86_64 at least.
I submitted the config.guess ARM EABI patch to upstream some time ago: http://savannah.gnu.org/patch/?5634 Could you carry it until it gets merged into upstream (at which point it'll end up in libtool semi-automatically)? I'll pester the upstream maintainer about merging it a bit more. Note that the redhat-rpm-config %configure macro copies config.guess from /usr/lib/rpm/redhat into the build directory, and the copy of config.guess in redhat-rpm-config was already updated to recognise ARM EABI. And so, packages that use %configure will get that version of config.guess automatically. However, the RH rpm spec file doesn't use %configure, so it builds with its own version of config.guess.
Both issues should be fixed in next rawhide build (currently building), holler if not...
Created attachment 160696 [details] Remaining rpm ARM spec file fixes. The attached spec file diff is still necessary. With this applied, things look good to me. I'm doing a test build now to make sure. Thanks again.