From b4710c1ee583250f6b5ad7d9cf7cd58372bd8dca Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 16 Apr 2024 20:52:16 +0200 Subject: [PATCH] elfutils: disable test suite when cross-compiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit elfutils' test suite uses uname(1) to determine if certain tests can be executed, e.g. it checks for x86_64 to learn whether it can use $CC -m64. Obviously, such checks fall flat if we are compiling from e.g. x86_64 to i686. Instead of skipping known bad tests, just be safe and disable for “executable” cross as well. --- pkgs/development/tools/misc/elfutils/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix index 838dfff80fe3..6de0780d5a61 100644 --- a/pkgs/development/tools/misc/elfutils/default.nix +++ b/pkgs/development/tools/misc/elfutils/default.nix @@ -77,11 +77,17 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # Backtrace unwinding tests rely on glibc-internal symbol names. - # Musl provides slightly different forms and fails. - # Let's disable tests there until musl support is fully upstreamed. - doCheck = !stdenv.hostPlatform.isMusl; - doInstallCheck = !stdenv.hostPlatform.isMusl; + + doCheck = + # Backtrace unwinding tests rely on glibc-internal symbol names. + # Musl provides slightly different forms and fails. + # Let's disable tests there until musl support is fully upstreamed. + !stdenv.hostPlatform.isMusl + # Test suite tries using `uname` to determine whether certain tests + # can be executed, so we need to match build and host platform exactly. + && (stdenv.hostPlatform == stdenv.buildPlatform); + doInstallCheck = !stdenv.hostPlatform.isMusl + && (stdenv.hostPlatform == stdenv.buildPlatform); passthru.updateScript = gitUpdater { url = "https://sourceware.org/git/elfutils.git";