diff options
author | Lancelot SIX <lsix@lancelotsix.com> | 2023-07-26 10:41:16 +0100 |
---|---|---|
committer | Lancelot SIX <lsix@lancelotsix.com> | 2023-07-26 10:41:16 +0100 |
commit | 9513725990ae41829f1461d86598d3c67d74caea (patch) | |
tree | e9d467a9782b2b70106b0292f80d9a25421b7312 /pkgs/development/tools/misc/gdb | |
parent | bbfd40bb37595f4f218fc8be6ad646373f6ef1bf (diff) | |
download | nixpkgs-9513725990ae41829f1461d86598d3c67d74caea.tar nixpkgs-9513725990ae41829f1461d86598d3c67d74caea.tar.gz nixpkgs-9513725990ae41829f1461d86598d3c67d74caea.tar.bz2 nixpkgs-9513725990ae41829f1461d86598d3c67d74caea.tar.lz nixpkgs-9513725990ae41829f1461d86598d3c67d74caea.tar.xz nixpkgs-9513725990ae41829f1461d86598d3c67d74caea.tar.zst nixpkgs-9513725990ae41829f1461d86598d3c67d74caea.zip |
gdb: disable sim by default
Out of the box, building GDB will also build the GNU simulator project[1]. When building GDB with --enable-target=all, this result in all simulators to be built, which accounts for a significant amount of space. This patch makes the default GDB package to not bundle sim. Sim can be enabled using `enableSim = true`; As a result, the default GDB install is now about 40M v.s. 650M when all simulators are included. [1] https://sourceware.org/gdb/wiki/Sim
Diffstat (limited to 'pkgs/development/tools/misc/gdb')
-rw-r--r-- | pkgs/development/tools/misc/gdb/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 129b55e7409..f627f3db2c8 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -10,6 +10,7 @@ , enableDebuginfod ? lib.meta.availableOn stdenv.hostPlatform elfutils, elfutils , guile ? null , hostCpuOnly ? false +, enableSim ? false , safePaths ? [ # $debugdir:$datadir/auto-load are whitelisted by default by GDB "$debugdir" "$datadir/auto-load" @@ -112,7 +113,8 @@ stdenv.mkDerivation rec { ] ++ lib.optional (!pythonSupport) "--without-python" ++ lib.optional stdenv.hostPlatform.isMusl "--disable-nls" ++ lib.optional stdenv.hostPlatform.isStatic "--disable-inprocess-agent" - ++ lib.optional enableDebuginfod "--with-debuginfod=yes"; + ++ lib.optional enableDebuginfod "--with-debuginfod=yes" + ++ lib.optional (!enableSim) "--disable-sim"; postInstall = '' # Remove Info files already provided by Binutils and other packages. |