Skip to content

Cross Toolchain Survey (June, 2025) #11395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2025
Merged

Conversation

MingcongBai
Copy link
Member

@MingcongBai MingcongBai commented Jun 17, 2025

Topic Description

  • gcc+cross: update to 14.3.0+glibc2.40+3
    • Sync patches with core-devel/gcc.
    • Add arm-none-eabi target per user request.
    • Install symlinks of triple-prefixed tools to /usr/bin.
    • Disable RISC-V cross toolchain for MIPS, as its code seem too large to
      handle even with LTO disabled.
  • binutils: update to 2.44
    • Revise sed invocations into patches.
    • Add arm-none-eabi target per user request.
    • Use GNU as the default hash style. [^1]
    • Backport a fix for poor linker relaxation performance. [^2]
    • Track patches at AOSC-Tracking/binutils-gdb @ aosc/binutils-2_44
      (HEAD: 072457058d06965a634c35c44b6ecc3c62609e56).
      [^1]: Override the default value "both" which causes ld to generate both
      DT_HASH and DT_GNU_HASH for link units. Those hash tables are only
      intended for ld.so, and Glibc ld.so has got the DT_GNU_HASH support
      in 2006. Since then if both DT_HASH and DT_GNU_HASH exists, the
      former is completely ignored thus it's just wasting disk space.
      One blockage for this was the combination of MIPS and ld.gold: MIPS
      uses DT_MIPS_XHASH that ld.gold does not support, instead of
      DT_GNU_HASH. The blockage is resolved now as ld.gold is removed.
      Another blockage is some closed-source non-cooperating program is
      (was?) (mis-)using DT_HASH for some strange purpose. Fortunately
      the program seems only relying on DT_HASH in Glibc, so even if the
      program is still not fixed and we still have to support it, we can
      just enable it for Glibc instead of every package.
      Link: https://wiki.linuxfromscratch.org/lfs/ticket/5401
      Link: https://maskray.me/blog/2022-08-21-glibc-and-dt-gnu-hash
      [^2]: https://sourceware.org/pipermail/binutils/2025-June/141825.html
      Co-authored-by: Xi Ruoyao [email protected]

Package(s) Affected

  • binutils: 2.44
  • binutils+cross-amd64: 2.44
  • binutils+cross-arm-none-eabi: 2.44
  • binutils+cross-arm64: 2.44
  • binutils+cross-loongarch64: 2.44
  • binutils+cross-loongson3: 2.44
  • binutils+cross-ppc64el: 2.44
  • binutils+cross-riscv64: 2.44
  • gcc+cross-amd64: 14.3.0+glibc2.40+3
  • gcc+cross-arm-none-eabi: 14.3.0+glibc2.40+3
  • gcc+cross-arm64: 14.3.0+glibc2.40+3
  • gcc+cross-loongarch64: 14.3.0+glibc2.40+3
  • gcc+cross-loongson3: 14.3.0+glibc2.40+3
  • gcc+cross-ppc64el: 14.3.0+glibc2.40+3
  • gcc+cross-riscv64: 14.3.0+glibc2.40+3

Security Update?

No

Build Order

#buildit binutils gcc+cross

Test Build(s) Done

Primary Architectures

  • AMD64 amd64
  • AArch64 arm64
  • LoongArch 64-bit loongarch64

Secondary Architectures

  • Loongson 3 loongson3
  • PowerPC 64-bit (Little Endian) ppc64el
  • RISC-V 64-bit riscv64

@MingcongBai MingcongBai added the survey Topic is a survey of a set or category of packages label Jun 17, 2025
@MingcongBai MingcongBai marked this pull request as ready for review June 17, 2025 01:48
MingcongBai and others added 2 commits June 17, 2025 16:03
- Revise sed invocations into patches.
- Add arm-none-eabi target per user request.
- Use GNU as the default hash style. [^1]
- Backport a fix for poor linker relaxation performance. [^2]
- Enable all targets for the main package to help with handling foreign
  arch/ABI objects.
- Track patches at AOSC-Tracking/binutils-gdb @ aosc/binutils-2_44
  (HEAD: 072457058d06965a634c35c44b6ecc3c62609e56).

[^1]: Override the default value "both" which causes ld to generate both
      DT_HASH and DT_GNU_HASH for link units.  Those hash tables are only
      intended for ld.so, and Glibc ld.so has got the DT_GNU_HASH support
      in 2006.  Since then if both DT_HASH and DT_GNU_HASH exists, the
      former is completely ignored thus it's just wasting disk space.

      One blockage for this was the combination of MIPS and ld.gold: MIPS
      uses DT_MIPS_XHASH that ld.gold does not support, instead of
      DT_GNU_HASH. The blockage is resolved now as ld.gold is removed.

      Another blockage is some closed-source non-cooperating program is
      (was?) (mis-)using DT_HASH for some strange purpose.  Fortunately
      the program seems only relying on DT_HASH in Glibc, so even if the
      program is still not fixed and we still have to support it, we can
      just enable it for Glibc instead of every package.

      Link: https://wiki.linuxfromscratch.org/lfs/ticket/5401
      Link: https://maskray.me/blog/2022-08-21-glibc-and-dt-gnu-hash

[^2]: https://sourceware.org/pipermail/binutils/2025-June/141825.html

Co-authored-by: Xi Ruoyao <[email protected]>
- Sync patches with core-devel/gcc.
- Add arm-none-eabi target per user request.
- Install symlinks of triple-prefixed tools to /usr/bin.
- Disable RISC-V cross toolchain for MIPS, as its code seem too large to
  handle even with LTO disabled.
@MingcongBai MingcongBai force-pushed the cross-toolchain-survey-20250617 branch from c07a5b7 to c7ff797 Compare June 17, 2025 08:04
Copy link
Contributor

@xry111 xry111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

82e173a5fd22bbb1b43cbc199aeca510.mp4

Tested by building https://github.com/libopencm3/libopencm3-examples/tree/master/examples/stm32/f3/stm32f3-discovery/fancyblink on LoongArch.

@MingcongBai MingcongBai merged commit bceb2e4 into stable Jun 28, 2025
@MingcongBai MingcongBai deleted the cross-toolchain-survey-20250617 branch June 28, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
survey Topic is a survey of a set or category of packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants