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.
This commit is contained in:
sternenseemann 2024-04-16 20:52:16 +02:00
parent c955f83d24
commit b4710c1ee5

View file

@ -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";