Commit 6226afed authored by Ben Wolsieffer's avatar Ben Wolsieffer
Browse files

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
parent 1c2bd1c6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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 = {