RPM and cross-compiling?

David Hagood david.hagood at gmail.com
Thu Sep 20 11:12:26 UTC 2012

On Thu, 2012-09-20 at 00:52 -0700, Valery Reznic wrote:
> As long as I understand you have no problem with foo-devel,
> only with foo itself and problem is you want two different packages.
> one for the target system, one for cross compiling.
> All the files in those two packages are same, just should be installed
> into different directories.
> Is it correct?
> Assuming that yes, I can suggest following:
> 1. Compile you software.
> 2. Use spec file1 with only %install stage to create package for target
> 3. Use spec file 2 with different %install that will create package for cross-compiling
> This solution will avoid compiling same files twice.
> Valery.
I've considered that, but if at all possible, I'd like to do this the
"right" way and have a source RPM for the package, to be able to capture
the work product and be able to regenerate it later.

It seems to me that supporting this sort of secondary packaging would be
a nice feature for RPM to support in the future.

More information about the Rpm-list mailing list