[Rpm-maint] Problems using RPM to build cross-compiled (MinGW/Windows) packages
Hans de Goede
j.w.r.degoede at hhs.nl
Mon Aug 4 12:52:29 UTC 2008
Richard W.M. Jones wrote:
> Hi, I hope this is the right place to raise these issues.
> We've recently been trying to build MinGW (a Windows cross-compiler)
> plus MinGW packages for Fedora. This "kinda" works, but there are
> some problems because RPM itself doesn't understand cross-compilation,
> or maybe we're just not using RPM right.
> The problems we've seen so far:
> (1) The default __os_install_post script does a lot of stuff which is
> not just irrelevant, but in fact dangerous. In particular it runs
> Linux 'strip' on Windows binaries which corrupts them. What we'd want
> it to do is to run the Windows-aware 'i686-pc-mingw32-strip' (from
> mingw-binutils) on Windows binaries/libraries instead.
> (2) The default RPM_OPT_FLAGS are wrong in several respects for
> cross-compiling. One big problem is that they include '-m32' or
> '-m64' depending on the host architecture (I think). Our target
> architecture is always 32 bit, so using -m64 is always wrong for us.
> Also, defaults like -fstack-protector don't work properly on Windows.
> (3) Auto-dependency generation doesn't work at all, so we end up with
> manual 'Requires:' in the spec files. I'm not even sure if there is a
> naming convention for Windows library deps.
> (4) Running configure in a subdirectory is common (ie. mkdir build; cd
> build; ../configure). This doesn't easily let me use %configure
> although in the end I found a really gross hack which worked.
I think it would be a good idea for you to take a look at the arm-gp2x-foo
cross-compile packages which contain workarounds (and nothing more) for all of
More information about the Rpm-maint