Bug 2523586 - Build cross binutils for primary architectures
Summary: Build cross binutils for primary architectures
Keywords:
Status: MODIFIED
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2523594 2546745
TreeView+ depends on / blocked
 
Reported: 2026-08-25 16:09 UTC by Siddhesh Poyarekar
Modified: 2026-10-07 11:03 UTC (History)
14 users (show)

Fixed In Version: binutils-2.47.50-9.fc46
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
sipoyare: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2523594 0 unspecified NEW Stop building cross binutils for primary architectures 2026-10-06 18:44:21 UTC
Red Hat Issue Tracker FC-4807 0 None None None 2026-08-26 12:50:23 UTC

Internal Links: 2523594

Description Siddhesh Poyarekar 2026-08-25 16:09:57 UTC
Take over build and maintenance of the cross binutils for the primary architectures (x86_64, aarch64, ppc64le, s390x) from cross-binutils. This needs coordination with cross-binutils package update, which should stop building these cross tools.

Reproducible: Always

Comment 1 Jakub Jelinek 2026-08-25 16:25:21 UTC
The cross-binutils.spec patch could be something like:
--- cross-binutils.spec.jj      2026-08-21 10:43:47.260932076 +0200                                                                                                                   
+++ cross-binutils.spec 2026-08-21 10:43:23.657236454 +0200                                                                                                                           
@@ -2,7 +2,13 @@                                                                                                                                                                      
 %global rpmprefix %{nil}                                                                                                                                                             
                                                                                                                                                                                      
 %global build_all              1                                                                                                                                                     
-%global build_aarch64          %{build_all}                                                                                                                                          
+%if 0%{?fedora} >= 46 || 0%{?rhel} >= 11                                                                                                                                             
+# In fc46+ binutils.spec provides the crosses for Fedora architectures.                                                                                                              
+%global build_base             0                                                                                                                                                     
+%else                                                                                                                                                                                
+%global build_base             1                                                                                                                                                     
+%endif                                                                                                                                                                               
+%global build_aarch64          %{build_base}                                                                                                                                         
 %global build_alpha            %{build_all}                                                                                                                                          
 %global build_arc              %{build_all}                                                                                                                                          
 %global build_arm              %{build_all}                                                                                                                                          
@@ -25,15 +31,15 @@                                                                                                                                                                   
 %global build_mn10300          %{build_all}                                                                                                                                          
 %global build_openrisc         %{build_all}                                                                                                                                          
 %global build_powerpc64                %{build_all}                                                                                                                                  
-%global build_powerpc64le      %{build_all}                                                                                                                                          
+%global build_powerpc64le      %{build_base}                                                                                                                                         
 %global build_riscv32          %{build_all}                                                                                                                                          
 %global build_riscv64          %{build_all}                                                                                                                                          
-%global build_s390x            %{build_all}                                                                                                                                          
+%global build_s390x            %{build_base}                                                                                                                                         
 %global build_score            %{build_all}                                                                                                                                          
 %global build_sh               %{build_all}                                                                                                                                          
 %global build_sparc64          %{build_all}                                                                                                                                          
 %global build_tile             %{build_all}                                                                                                                                          
-%global build_x86_64           %{build_all}                                                                                                                                          
+%global build_x86_64           %{build_base}                                                                                                                                         
 %global build_xtensa           %{build_all}                                                                                                                                          
                                                                                                                                                                                      
 # 32-bit packages we don't build as we can use the 64-bit package instead                                                                                                            

On the binutils side, it would be nice to enable what RHEL has for the Fedora architectures, but enable it on all arches (perhaps except i?86), crosses to all other Fedora arches (except for the native one).
There are differences in the triplets, cross-binutils.spec uses triplets like <arch>-linux-gnu, while RHEL and glibc sysroots and the gcc.spec cross gcc uses <arch>-redhat-linux.  And powerpc64le vs. ppc64le too.
Ideally, binutils.spec crosses would Obsoletes the cross-binutils subpackages, Provides what those names for compatibility and ship symlinks from thee other triplets.

Comment 2 Jakub Jelinek 2026-08-25 16:25:48 UTC
And enable only in fedora >= 46 and rhel >= 11.

Comment 3 Nick Clifton 2026-09-14 17:09:56 UTC
Pull request to update the cross-binutils package created: https://src.fedoraproject.org/rpms/cross-binutils/pull-request/9

Comment 4 Nick Clifton 2026-09-15 12:09:26 UTC
Rawhide binutils updated. Going through Bodhi now...

Comment 5 Jakub Jelinek 2026-09-15 12:48:44 UTC
Thanks, just wonder if for seamless backwards compatibility the cross subpackages of binutils couldn't add Provides: binutils-aarch64-%{linux_system} = %{version}-%{release} etc. too
(and so Obsoletes with < %{version}-%{release} as well).
Will try to adjust gcc.spec for these changes soon.

Comment 6 Nick Clifton 2026-09-16 12:09:53 UTC
Thanks Jakub - that is a great suggestion.  I have implemented it in the new 2.47.50-9.fc46 build.

Comment 7 Yann Droneaud 2026-09-26 18:39:41 UTC
When will the aarch64 cross toolchain will be available again ? aarch64-linux-gnu- prefixed tools are no more available, thus `make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-` doesn't work anymore

Comment 8 Miro Hrončok 2026-10-06 18:45:16 UTC
cross-binutils-x86_64 disappeared from x86_64

Comment 9 Artur Frenszek-Iwicki 2026-10-07 10:11:14 UTC
To expand on the comment above - in FPC, cross-binutils-x86_64 is used for cross-compiling to x86_64 (duh) and to i386.
The latter is the reason why fpc-cross-i386 wants to install cross-x86_64 even on x86_64.

Do the "normal" binutils for x86_64 support i386?
If that's the case, then I could edit the FPC spec so it only pulls cross-binutils-x86_64 on other architectures.

Comment 10 Jakub Jelinek 2026-10-07 11:03:21 UTC
Not installing crosses where the native toolchain is available is intentional, it makes no sense to "cross-compile" when you can compile natively.
Normal binutils on x86_64 do support i386.  cross binutils from binutils package from say aarch64 to x86_64 should also support i386 (though I think we want to eventually change
the glibc sysroot subpackages so that the i386 ones install links into the 64-bit sysroot as well.
Regarding
"When will the aarch64 cross toolchain will be available again ? aarch64-linux-gnu- prefixed tools are no more available, thus `make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-` doesn't work anymore"
the question is where?  The subpackages are named differently, but I believe except on aarch64 they should still be provided.  On aarch64 just use the native toolchain instead.

We will change gcc similarly soon.


Note You need to log in before you can comment on or make changes to this bug.