Skip to content

Commit

Permalink
elfutils: disable test suite when cross-compiling
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sternenseemann committed Apr 30, 2024
1 parent c955f83 commit b4710c1
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pkgs/development/tools/misc/elfutils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit b4710c1

Please sign in to comment.