telegraf: pass --long-plt to linker on AArch32

Without this flag, linking fails with the following message:

armv7l-unknown-linux-gnueabihf-ld.bfd: BFD (GNU Binutils) 2.46 assertion fail /build/binutils-with-gold-2.46/bfd/elf32-arm.c:9783
This commit is contained in:
Ben Wolsieffer
2026-05-01 22:36:23 -04:00
parent 1c2bd1c6d9
commit 6226afedda
+7
View File
@@ -29,6 +29,13 @@ buildGoModule (finalAttrs: {
"-w"
"-X=github.com/influxdata/telegraf/internal.Commit=${finalAttrs.src.rev}"
"-X=github.com/influxdata/telegraf/internal.Version=${finalAttrs.version}"
]
# Binary is too large for the default GOT PLT displacments on 32-bit ARM;
# need to use larger encoding otherwise linking fails with:
# BFD (GNU Binutils) 2.46 assertion fail /build/binutils-with-gold-2.46/bfd/elf32-arm.c:9783
++ lib.optionals stdenv.hostPlatform.isAarch32 [
"-extldflags"
"-Wl,--long-plt"
];
passthru.tests = {