From 74df7532f2f95619721c8681961253bfb805e937 Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Tue, 10 Sep 2024 16:06:14 +0200 Subject: [PATCH] dtc: disable tests when building statically One of the tests tries to build a shared library. This fails with the following messages: /nix/store/ihajn8cwijqqxz3rvrlznaz339vh2gac-x86_64-unknown-linux-musl-binutils-2.42/bin/x86_64-unknown-linux-musl-ld: /nix/store/h9gcvnp90mpniyx2v0d0p3s06hkx1v2p-x86_64-unknown-linux-musl-gcc-13.3.0/lib/gcc/x86_64-unknown-linux-musl/13.3.0/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object /nix/store/ihajn8cwijqqxz3rvrlznaz339vh2gac-x86_64-unknown-linux-musl-binutils-2.42/bin/x86_64-unknown-linux-musl-ld: failed to set dynamic section sizes: bad value --- pkgs/development/compilers/dtc/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index 3bf938b75903..d244fc62aef4 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -109,6 +109,11 @@ stdenv.mkDerivation (finalAttrs: { # Checks are broken on aarch64 darwin # https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436 !stdenv.isDarwin && + # Checks are broken when building statically on x86_64 linux with musl + # One of the test tries to build a shared library and this causes the linker: + # x86_64-unknown-linux-musl-ld: /nix/store/h9gcvnp90mpniyx2v0d0p3s06hkx1v2p-x86_64-unknown-linux-musl-gcc-13.3.0/lib/gcc/x86_64-unknown-linux-musl/13.3.0/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object + # x86_64-unknown-linux-musl-ld: failed to set dynamic section sizes: bad value + !stdenv.hostPlatform.isStatic && # we must explicitly disable this here so that mesonFlags receives # `-Dtests=disabled`; without it meson will attempt to run