diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-02-13 14:36:08 -0800 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2023-02-22 19:30:34 -0800 |
commit | 24b07fc9e5216d8ae22205c2f8c688e2738d8502 (patch) | |
tree | 56ffb5f420e5c2b6cf9a53ec06e4ef72a01c4dab /pkgs/development/compilers/gcc/11 | |
parent | 2d285b1590ee2326d234a31cdc4a632ab3d2443d (diff) | |
download | nixpkgs-24b07fc9e5216d8ae22205c2f8c688e2738d8502.tar nixpkgs-24b07fc9e5216d8ae22205c2f8c688e2738d8502.tar.gz nixpkgs-24b07fc9e5216d8ae22205c2f8c688e2738d8502.tar.bz2 nixpkgs-24b07fc9e5216d8ae22205c2f8c688e2738d8502.tar.lz nixpkgs-24b07fc9e5216d8ae22205c2f8c688e2738d8502.tar.xz nixpkgs-24b07fc9e5216d8ae22205c2f8c688e2738d8502.tar.zst nixpkgs-24b07fc9e5216d8ae22205c2f8c688e2738d8502.zip |
gcc/common: add disableGdbPlugin option
This commit adds an option `disableGdbPlugin` which controls whether or not the plugin *for* GDB will be built. This plugin contains a copy of `gcc`. The configure flag that this option controls is called `--disable-libcc1`. This flag name is slightly confusing: it is used only by GDB (and apparently unmaintained), yet the flag name does not mention GDB. This is why the option name is different from the configure flag name. The primary motivation for this commit is to allow the following PR (which is not yet merged) to pass `--disable-libcc1` when building the final native (build=host=target) compiler as part of the stdenv bootstrap: https://github.com/NixOS/nixpkgs/pull/209870 We need to `--disable-libcc1` in this scenario because gcc's build machinery links `libcc1` against the `libstdc++` that is part of the *compiler used to compile gcc*, rather than against the `libstdc++` that is built *by* gcc. In an FHS distribution this distinction is not terribly important because dynamically linked libraries are late-bound (ld.so resolution). However in nixpkgs this causes a reference back to the bootstrapFiles to leak all the way through to the final stdenv. More details can be found in the comment in `pkgs/stdenv/linux/default.nix` of the PR linked above. Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/development/compilers/gcc/11')
-rw-r--r-- | pkgs/development/compilers/gcc/11/default.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 15b21fcdbea..3919fbe89f3 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -27,6 +27,7 @@ , cloog # unused; just for compat with gcc4, as we override the parameter on some places , buildPackages , libxcrypt +, disableGdbPlugin ? !enablePlugin }: # Make sure we get GNU sed. @@ -115,6 +116,7 @@ let majorVersion = "11"; enableLTO enableMultilib enablePlugin + disableGdbPlugin enableShared disableBootstrap fetchpatch |