pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Refactoring the GCC cross compilers




To: pkgsrc-users%netbsd.org@localhost, tech-pkg%netbsd.org@localhost

Subject: Refactoring the GCC cross compilers

From: Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost>

Date: Fri, 30 Jan 2026 15:24:28 +1300


Kia ora koutou,
We've been creating new GCC targ
ets in pkgsrc/cross by simply copying  the Makefiles for other targets and the amount of duplication has got  out of hand. We have five U-Boot architectures that use these cross  compilers and the U-Boot docs make it quite clear that they do not  expect us to maintain GCC 8 from 2018.

We've a
lso got a large number of patches that are simply not needed any  more because upstream has applied the patch and we simply haven't  updated our end to use the updated toolchain.

The only differe
nce between these packages is the GNU target triple and  sometimes the GCC version.

I have created
 in WIP a directory called common-gnu-toolchain that  contains the common Makefile fragments, distinfo files and patches. I  have also created in WIP the following packages to use this refactored code.

* aarch64-none-elf-binutils
* aarch64-none-elf-gcc

* arm-none-eabi-binutils
* arm-none-eabi-gcc
* arm-none-eabi-gdb

* mipsel-none-elf-binutils
* mipsel-none-elf-gcc

* powerpc-none-elf-binutils
* powerpc-none-elf-gcc

* riscv64-none-elf-binutils
* riscv64-none-elf-gcc
* riscv64-none-elf-gdb

The package Makefiles are now pretty much just

    TARGET=        arm-none-eabi
    MAINTAINER=    ryoon%NetBSD.org@localhost
    COMMENT=    Cross binutils for bare metal ARM EABI

    .include "../../wip/common-gnu-toolchain/binutils.mk"
    .include "../../mk/bsd.pkg.mk"

Most GCCs have been upgra
ded to 14.3, but powerpc and mipsel cross  compilers are still using GCC 13.2 because newlib for those platforms  has K&R code for testing the linker and it won't compile with a newer  GCC. Upstream is working on that problem.

I'm currently working though the pkglint reports for each package.

I
 have removed the TEXINFO_REQD for gcc because it doesn't seem to be  required on NetBSD 11 and I expect that it will need to be turned back  on for older versions of NetBSD.

I have put this all 
in pkgsrc WIP because I'm hoping it will be easier  to see what I've done there rather than trying to read diffs covering a  dozen directories.

I would like feedback and approval before commiting this to pkgsrc itself.

Ngā mihi,
Lloyd





Prev by Date: Re: devel/abseil asks for gcc-12 ((Re: NetBSD/9.4

Previous by Thread: converters/orcus/buildlink3.mk inconsistent after upgrade

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index