3
0
Fork 0
forked from mirrors/nixpkgs

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?!
This commit is contained in:
John Ericson 2017-10-17 16:44:24 -04:00
parent e65259f00c
commit f8741c38cd
4 changed files with 30 additions and 23 deletions

View file

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

View file

@ -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.

View file

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

View file

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