summaryrefslogtreecommitdiffstats
path: root/pkgs/development
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2024-04-16 20:52:16 +0200
committersternenseemann <sternenseemann@systemli.org>2024-04-30 14:42:59 +0200
commitb4710c1ee583250f6b5ad7d9cf7cd58372bd8dca (patch)
tree77b94738621f48f7660c06beb9df6c7ecfdb5c91 /pkgs/development
parentc955f83d246084b5c645c993e3c8782ebef6a2e5 (diff)
elfutils: disable test suite when cross-compiling
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.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/misc/elfutils/default.nix16
1 files 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";