Bug 1219627 - RPM uses wrong target triple for armvX since switch to cmake
Summary: RPM uses wrong target triple for armvX since switch to cmake
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Michael Schröder
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-06 13:40 UTC by Fabian Vogt
Modified: 2024-02-16 16:11 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2024-02-06 13:40:13 UTC
Before RPM 4.19, the .spec file had

%ifarch %arm
BUILDTARGET="--build=%{_target_cpu}-suse-linux-gnueabi"
%elifarch x86_64 %x86_64
BUILDTARGET="--build=x86_64-suse-linux"
%else
BUILDTARGET="--build=%{_target_cpu}-suse-linux"
%endif

This is now gone and I don't see a way to easily do that with cmake.

The result is that for e.g. armv7hl, the host macros changed:

Before:

%_host                  armv7hl-suse-linux-gnueabi
%_host_alias            armv7hl-suse-linux-gnueabi%{nil}
%_host_cpu              armv7hl
%_host_vendor           suse
%_host_os               linux

After:

%_host                  armv7l-suse-linux
%_host_alias            armv7l-suse-linux%{nil}
%_host_cpu              armv7l
%_host_vendor           suse
%_host_os               linux

This means that binaries built for armv7hl have the wrong %_host specified, whic h is also used in %configure to set --host.
Comment 1 Michael Schröder 2024-02-07 09:20:27 UTC
The specfile contains
%ifarch %arm
  -DRPMCANONGNU=-gnueabi \
%endif

instead. I'm pretty sure I checked that this worked at some point in time.
Comment 2 Fabian Vogt 2024-02-07 09:22:36 UTC
(In reply to Michael Schröder from comment #1)
> The specfile contains
> %ifarch %arm
>   -DRPMCANONGNU=-gnueabi \
> %endif
> 
> instead. I'm pretty sure I checked that this worked at some point in time.

That part works, but it only changes %_gnu in /usr/lib/rpm/platform/*/macros.
Comment 3 Michael Schröder 2024-02-07 09:38:00 UTC
Hmm, it worked for the %_gnu, but never for %_host. Fixing...
Comment 4 Fabian Vogt 2024-02-07 09:42:29 UTC
(In reply to Michael Schröder from comment #3)
> Hmm, it worked for the %_gnu, but never for %_host. Fixing...

Note that it's not the -gnueabi part that matters most here but the armv7l vs armv7hl.
Comment 5 OBSbugzilla Bot 2024-02-07 11:35:03 UTC
This is an autogenerated message for OBS integration:
This bug (1219627) was mentioned in
https://build.opensuse.org/request/show/1144867 Factory / rpm
Comment 6 Fabian Vogt 2024-02-16 16:11:39 UTC
(In reply to OBSbugzilla Bot from comment #5)
> This is an autogenerated message for OBS integration:
> This bug (1219627) was mentioned in
> https://build.opensuse.org/request/show/1144867 Factory / rpm

Fixed.