From cb040db7ab06db02e9e6544b574ec232c61eceeb Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 14 Mar 2022 17:36:05 +0000 Subject: [PATCH] pkgsStatic.gcc: fix build LTO requires building a compiler plugin, which is a shared object. The closure is a bit wild but it builds and can compile programs. --- pkgs/development/compilers/gcc/10/default.nix | 2 +- pkgs/development/compilers/gcc/11/default.nix | 2 +- pkgs/development/compilers/gcc/4.8/default.nix | 2 +- pkgs/development/compilers/gcc/4.9/default.nix | 2 +- pkgs/development/compilers/gcc/6/default.nix | 2 +- pkgs/development/compilers/gcc/7/default.nix | 2 +- pkgs/development/compilers/gcc/8/default.nix | 2 +- pkgs/development/compilers/gcc/9/default.nix | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 4493fd936ec3..a26aaf771af3 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -14,7 +14,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) , gmp, mpfr, libmpc, gettext, which, patchelf diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index a9498b1060db..b78ca339fb85 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -14,7 +14,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) , gmp, mpfr, libmpc, gettext, which, patchelf diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index c192c603c883..bc7868cc4606 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -14,7 +14,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java , gmp, mpfr, libmpc, gettext, which, patchelf diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 70278c237d4c..bb1a3dd7d636 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -14,7 +14,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java , gmp, mpfr, libmpc, gettext, which, patchelf diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 1809d7ae42ef..7548ec56c759 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -15,7 +15,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , flex , perl ? null # optional, for texi2pod (then pod2man); required for Java diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index dcb7d0b91f6f..dfac97104eb6 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -13,7 +13,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) , gmp, mpfr, libmpc, gettext, which, patchelf diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 01deb2727b85..609dfa722a65 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -13,7 +13,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) , gmp, mpfr, libmpc, gettext, which, patchelf diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 9d21ed667f6c..ea4296826661 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -15,7 +15,7 @@ # we can't rebuild those without also rebuilding the compiler itself, # we opt to always build everything unlike our usual policy. enableShared ? true -, enableLTO ? true +, enableLTO ? !stdenv.hostPlatform.isStatic , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) , gmp, mpfr, libmpc, gettext, which, patchelf