From b8b5fc1463033d7d4aadefafc7f2b091d8415382 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 1 Feb 2023 07:39:45 +0000 Subject: [PATCH] gcc: revert "provide both native and cross forms of gcc.libs libraries" This reverts commit 2c931bd5f404162c15de10dca8e476e5469b2994. The https://github.com/NixOS/nixpkgs/pull/209153 reverted --sysroot=/ change as it broke other astects of library search paths. While it might still be useful to pull in gcc libraries when non-standard --sysroot= is passed there are no meaningful use cases of it in `nixpkgs` yet. Let's revert it for now. --- pkgs/development/compilers/gcc/10/default.nix | 1 - pkgs/development/compilers/gcc/11/default.nix | 1 - pkgs/development/compilers/gcc/12/default.nix | 1 - pkgs/development/compilers/gcc/4.8/default.nix | 1 - pkgs/development/compilers/gcc/4.9/default.nix | 1 - pkgs/development/compilers/gcc/6/default.nix | 1 - pkgs/development/compilers/gcc/7/default.nix | 1 - pkgs/development/compilers/gcc/8/default.nix | 1 - pkgs/development/compilers/gcc/9/default.nix | 1 - pkgs/development/compilers/gcc/builder.sh | 11 ----------- 10 files changed, 20 deletions(-) diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 1a0a6e4b0d0ecc0..42939d5cf47fe59 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -228,7 +228,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 20da9a97aa5c39f..43fb799b6c52c41 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -234,7 +234,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/12/default.nix b/pkgs/development/compilers/gcc/12/default.nix index 74b03535a089f2c..3ba5991a6b8c5f6 100644 --- a/pkgs/development/compilers/gcc/12/default.nix +++ b/pkgs/development/compilers/gcc/12/default.nix @@ -270,7 +270,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 810706ed0f3dc28..042e561a2e363e0 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -227,7 +227,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index e25af867e5374e9..8420cfdde7d5c14 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -247,7 +247,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index fcb667b2413f31d..4ed3b39fe07462e 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -265,7 +265,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index bb6a6b66a20f025..c35eddaf6033d02 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -233,7 +233,6 @@ stdenv.mkDerivation ({ ; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index d4cd1f5aadc957a..ec85e5b74501928 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -212,7 +212,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 248a92a2965a0f2..6222623f0a24c3c 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -226,7 +226,6 @@ stdenv.mkDerivation ({ }; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - targetPlatformConfig = targetPlatform.config; buildFlags = optional (targetPlatform == hostPlatform && hostPlatform == buildPlatform) diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index dd5a8de76e2a87b..2d7a058fa015cad 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -203,17 +203,6 @@ preInstall() { ln -s lib "$out/${targetConfig}/lib32" ln -s lib "${!outputLib}/${targetConfig}/lib32" fi - - # cc-wrappers uses --sysroot=/nix/store/does/not/exist as a way to - # drop default sysheaders search path. Unfortunately that switches - # clang++ into searching libraries in gcc in cross-compiler paths: - # from ${!outputLib}/lib (native) - # to ${!outputLib}/${targetPlatformConfig}/lib - # We create the symlink to make both native and cross paths - # available even if the toolchain is not the cross-compiler. - if [ ! -e ${!outputLib}/${targetPlatformConfig} ] ; then - ln -s . ${!outputLib}/${targetPlatformConfig} - fi }