Merge pull request #289874 from alyssais/pkgsStatic.strace

pkgsStatic.strace: fix build
This commit is contained in:
Maximilian Bosch 2024-02-19 22:21:55 +01:00 committed by GitHub
commit c5e62ec76a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
description = "A set of utilities to handle ELF objects";
platforms = platforms.linux;
# https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-November/004223.html
broken = stdenv.hostPlatform.isStatic;
badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ];
# licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins,
# but since this package isn't split that way, all three are listed.
license = with licenses; [ gpl2Only lgpl3Plus gpl3Plus ];

View File

@ -12,9 +12,12 @@ stdenv.mkDerivation rec {
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ];
# libunwind for -k.
# On RISC-V platforms, LLVM's libunwind implementation is unsupported by strace.
# The build will silently fall back and -k will not work on RISC-V.
buildInputs = [ libunwind elfutils ]; # support -k and -kk
buildInputs = [ libunwind ]
# -kk
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform elfutils) elfutils;
configureFlags = [ "--enable-mpers=check" ];