gdb: always set --program-prefix and pass --target

This makes the targetPrefix always conform to nixpkgs' expectations
instead of relying on the autotools build system to figure it out
correctly (which is also inconsistent across versions).

See also ca9be0511b.
launchpad/nixpkgs/master
sternenseemann 3 years ago
parent acdc783418
commit e75c5353bb
  1. 10
      pkgs/development/tools/misc/gdb/default.nix

@ -61,8 +61,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral";
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
configurePlatforms = [ "build" "host" "target" ];
# GDB have to be built out of tree.
preConfigure = ''
@ -72,6 +71,13 @@ stdenv.mkDerivation rec {
configureScript = "../configure";
configureFlags = with lib; [
# Set the program prefix to the current targetPrefix.
# This ensures that the prefix always conforms to
# nixpkgs' expectations instead of relying on the build
# system which only receives `config` which is merely a
# subset of the platform description.
"--program-prefix=${targetPrefix}"
"--enable-targets=all" "--enable-64-bit-bfd"
"--disable-install-libbfd"
"--disable-shared" "--enable-static"

Loading…
Cancel
Save