diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-04-04 07:35:03 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-04-05 07:43:22 +0100 |
commit | c2e14a73e664626c74537fc5dffba84069d50418 (patch) | |
tree | 08e34579d3ba34bdaf45427a1a7bfefe087814b5 /pkgs/stdenv/linux | |
parent | 80f198ff3a6569d7874862ae41eda743cea02fc1 (diff) | |
download | nixpkgs-c2e14a73e664626c74537fc5dffba84069d50418.tar nixpkgs-c2e14a73e664626c74537fc5dffba84069d50418.tar.gz nixpkgs-c2e14a73e664626c74537fc5dffba84069d50418.tar.bz2 nixpkgs-c2e14a73e664626c74537fc5dffba84069d50418.tar.lz nixpkgs-c2e14a73e664626c74537fc5dffba84069d50418.tar.xz nixpkgs-c2e14a73e664626c74537fc5dffba84069d50418.tar.zst nixpkgs-c2e14a73e664626c74537fc5dffba84069d50418.zip |
xgcc: avoid libc.so mix between gcc and binutils-ld linker plugin
Without the change when I attempt to built `nixpkgs` with weekly `gcc-13` (it pulls in `flex` as a build input`) I am getting build failure related to glibc mix caused by glibc loading: ...-binutils-patchelfed-ld-2.40/bin/ld: ...-xgcc-13.0.0/libexec/gcc/x86_64-unknown-linux-gnu/13.0.1/liblto_plugin.so: error loading plugin: ...-bootstrap-tools/lib/libpthread.so.0: undefined symbol: __libc_vfork, version GLIBC_PRIVATE The change disables LTO plugin entirely to avoid loading of `glibc` mix.
Diffstat (limited to 'pkgs/stdenv/linux')
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index ca6d720fe77..ddfbc11b640 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -341,6 +341,13 @@ in # name = "xgcc"; + # xgcc uses ld linked against nixpkgs' glibc and gcc built + # against bootstrapTools glibc. We can't allow loading + # $out/libexec/gcc/x86_64-unknown-linux-gnu/13.0.1/liblto_plugin.so + # to mix libc.so: + # ...-binutils-patchelfed-ld-2.40/bin/ld: ...-xgcc-13.0.0/libexec/gcc/x86_64-unknown-linux-gnu/13.0.1/liblto_plugin.so: + # error loading plugin: ...-bootstrap-tools/lib/libpthread.so.0: undefined symbol: __libc_vfork, version GLIBC_PRIVATE + enableLTO = false; })).overrideAttrs (a: { # This signals to cc-wrapper (as overridden above in this file) to add `--sysroot` |