lol

binutils: Add lib output

Some packages depend on libbfd. This prevents them from having all of
binutils in their closure (which is 29 MiB).

authored by

Eelco Dolstra and committed by
Robin Gloster
17a344a5 e33bc133

+26 -1
+7 -1
pkgs/development/tools/misc/binutils/default.nix
··· 32 32 # This is needed, for instance, so that running "ldd" on a binary that is 33 33 # PaX-marked to disable mprotect doesn't fail with permission denied. 34 34 ./pt-pax-flags.patch 35 + 36 + # Bfd looks in BINDIR/../lib for some plugins that don't 37 + # exist. This is pointless (since users can't install plugins 38 + # there) and causes a cycle between the lib and bin outputs, so 39 + # get rid of it. 40 + ./no-plugins.patch 35 41 ]; 36 42 37 - outputs = [ "out" "info" ] ++ (optional (cross == null) "dev"); 43 + outputs = [ "out" "lib" "info" ] ++ (optional (cross == null) "dev"); 38 44 39 45 nativeBuildInputs = [ bison ]; 40 46 buildInputs = [ zlib ];
+19
pkgs/development/tools/misc/binutils/no-plugins.patch
··· 1 + diff -ru binutils-2.27-orig/bfd/plugin.c binutils-2.27/bfd/plugin.c 2 + --- binutils-2.27-orig/bfd/plugin.c 2016-10-14 17:46:30.791315555 +0200 3 + +++ binutils-2.27/bfd/plugin.c 2016-10-14 17:46:38.583298765 +0200 4 + @@ -333,6 +333,7 @@ 5 + if (plugin_program_name == NULL) 6 + return found; 7 + 8 + +#if 0 9 + plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL); 10 + p = make_relative_prefix (plugin_program_name, 11 + BINDIR, 12 + @@ -364,6 +365,7 @@ 13 + free (p); 14 + if (d) 15 + closedir (d); 16 + +#endif 17 + 18 + return found; 19 + }