[Rpm-maint] [rpm-software-management/rpm] Cross build macro confusion (#1650)
Michael Schroeder
notifications at github.com
Thu Apr 22 12:36:22 UTC 2021
This issue may be a misunderstanding on my side, so take the following with a grain of salt.
I'm confused by rpm's handling of %_build, %_host, and %_target. In autofoo speech (this is what rpm's definitions are based on), --build is the local host architecture, --host is the architecture we're building for, and --target is the architecture for compiler code generation if we're building a compiler.
Rpm's usage is kind of weird in that regard:
%_target_cpu et al is used for the rpm result architecture (i.e. what --host is specifying)
%_host et al is set to the host rpm was build with (i.e. like --build)
%_build expands to %_host
There's also %_build_arch in the platform file which is thus changing with rpm's --target option.
I'm somewhat confused why %_build expands to %_host. Wouldn't it make more sense to do set %_build to the fixed values and set %_host to `%_build`? That way one could change %_host when doing a cross compile.
It's also weird that the --target option does not change %_host, like it ought to do. We can't change the %_target_cpu usages in rpm and spec file, but we could change both %_host and %_target.
I'm surly not the first one experimenting with cross building with rpm, so this is probably not something new. And autofoo's weird usage of --build, --host, --target doesn't help either...
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1650
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210422/dd9e9946/attachment.html>
More information about the Rpm-maint
mailing list