Bug 36663
| Summary: | Add the _build_arch macro for cross-build. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | hjl | ||||
| Component: | rpm-build | Assignee: | Jeff Johnson <jbj> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.1 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | i386 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2001-07-17 17:21:45 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 15785 [details]
Add _build_arch
These are rpm-build, not rpm, issues ... Fixed in my next checkin, should be in rpm-4.0.3-0.84. I have added
%if %{_arch} != %{_build_arch}
%define cross_compile 1
%else
%define cross_compile 0
%endif
%{?do_cross_compile:%define cross_compile 1}
to many spec files. It will be nice for rpm to define
%{cross_compile} automatically.
|
There is no easy to tell from a spec file if we are cross-building a rpm. You can use %if %{_target_cpu} != %{_build_cpu} ... %endif But it doesn't work with # rpm --target=i686 ... on ia32. I think we need _build_arch so that we can do %if %{_arch} != %{_build_arch} ... %endif