binutils, gdb: Do not expose libbfd or libopcodes, and be multitarget

There are separate derivations for these libraries and we don't want
conflict. Multitarget is generally more useful, and will eventually
speed up cross builds, so why not?!
wip/yesman
John Ericson 7 years ago
parent e65259f00c
commit f8741c38cd
  1. 23
      pkgs/development/tools/misc/binutils/default.nix
  2. 27
      pkgs/development/tools/misc/gdb/default.nix
  3. 1
      pkgs/top-level/aliases.nix
  4. 2
      pkgs/top-level/all-packages.nix

@ -50,13 +50,9 @@ stdenv.mkDerivation rec {
./no-plugins.patch
];
outputs = [ "out" ]
++ optional (targetPlatform == hostPlatform && !hostPlatform.isDarwin) "lib" # problems in Darwin stdenv
++ [ "info" ]
++ optional (targetPlatform == hostPlatform) "dev";
outputs = [ "out" "info" ];
nativeBuildInputs = [ bison ]
++ optional (hostPlatform != buildPlatform) buildPackages.stdenv.cc;
nativeBuildInputs = [ bison buildPackages.stdenv.cc ];
buildInputs = [ zlib ];
inherit noSysDirs;
@ -87,11 +83,16 @@ stdenv.mkDerivation rec {
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
[ "--enable-shared" "--enable-deterministic-archives" "--disable-werror" ]
++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop"
++ optionals gold [ "--enable-gold" "--enable-plugins" ]
++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu";
configureFlags = [
"--enable-targets=all" "--enable-64-bit-bfd"
"--disable-install-libbfd"
"--disable-shared" "--enable-static"
"--with-system-zlib"
"--enable-deterministic-archives"
"--disable-werror"
"--enable-fix-loongson2f-nop"
] ++ optionals gold [ "--enable-gold" "--enable-plugins" ];
enableParallelBuilding = true;

@ -1,18 +1,19 @@
{ fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo, zlib
, dejagnu, perl, pkgconfig
{ stdenv
# Build time
, fetchurl, pkgconfig, perl, texinfo, setupDebugInfoDirs
# Run time
, ncurses, readline, gmp, mpfr, expat, zlib, dejagnu
, buildPlatform, hostPlatform, targetPlatform
, pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null
, guile ? null
# Support all known targets in one gdb binary.
, multitarget ? false
# Additional dependencies for GNU/Hurd.
, mig ? null, hurd ? null
, setupDebugInfoDirs
}:
let
@ -58,10 +59,16 @@ stdenv.mkDerivation rec {
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = with stdenv.lib; [
"--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
"--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
] ++ stdenv.lib.optional (!pythonSupport) "--without-python"
++ stdenv.lib.optional multitarget "--enable-targets=all";
"--enable-targets=all" "--enable-64-bit-bfd"
"--disable-install-libbfd"
"--disable-shared" "--enable-static"
"--with-system-zlib"
"--with-system-readline"
"--with-gmp=${gmp.dev}"
"--with-mpfr=${mpfr.dev}"
"--with-expat" "--with-libexpat-prefix=${expat.dev}"
] ++ stdenv.lib.optional (!pythonSupport) "--without-python";
postInstall =
'' # Remove Info files already provided by Binutils and other packages.

@ -57,6 +57,7 @@ mapAliases (rec {
foomatic_filters = foomatic-filters; # 2016-08
fuse_exfat = exfat; # 2015-09-11
gettextWithExpat = gettext; # 2016-02-19
gdb-multitarget = gdb; # added 2017-11-13
git-hub = gitAndTools.git-hub; # added 2016-04-29
googleAuthenticator = google-authenticator; # added 2016-10-16
grantlee5 = libsForQt5.grantlee; # added 2015-12-19

@ -7680,8 +7680,6 @@ with pkgs;
inherit (gnu) mig;
};
gdb-multitarget = lowPrio (gdb.override { multitarget = true; });
valgrind = callPackage ../development/tools/analysis/valgrind {
inherit (darwin) xnu bootstrap_cmds cctools;
llvm = llvm_39;

Loading…
Cancel
Save