From 5b47eb13accbe58e5f8ee3b4483fa4a4556ac9cf Mon Sep 17 00:00:00 2001 From: Gaelan Steele Date: Tue, 19 Jan 2021 18:18:01 -0800 Subject: [PATCH] gcc, clang11: don't force -fcommon on GCC 10 or clang11 GCC 10 sets -fno-common by default. This broke some packages, so when moving to GCC 10 we initially disabled this behavior. This commit reverts that, bringing us closer to the standard and upstream. Co-authored-by: Sergei Trofimovich --- .../compilers/gcc/common/configure-flags.nix | 3 --- pkgs/development/compilers/llvm/11/clang/default.nix | 12 ------------ 2 files changed, 15 deletions(-) diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index bebf91114d70..910d93d42da1 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -222,9 +222,6 @@ let ++ lib.optionals (langD) [ "--with-target-system-zlib=yes" ] - # Make -fcommon default on gcc10 - # TODO: fix all packages (probably 100+) and remove that - ++ lib.optional (version >= "10.1.0") "--with-specs=%{!fno-common:%{!fcommon:-fcommon}}" ; in configureFlags diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix index 58439f02a5c9..4bcdb3ca78b4 100644 --- a/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -50,18 +50,6 @@ let ./purity.patch # https://reviews.llvm.org/D51899 ./gnu-install-dirs.patch - # Revert: [Driver] Default to -fno-common for all targets - # https://reviews.llvm.org/D75056 - # - # Maintains compatibility with packages that haven't been fixed yet, and - # matches gcc10's configuration in nixpkgs. - (fetchpatch { - revert = true; - url = "https://github.com/llvm/llvm-project/commit/0a9fc9233e172601e26381810d093e02ef410f65.diff"; - stripLen = 1; - excludes = [ "docs/*" "test/*" ]; - sha256 = "0gxgmi0qbm89mq911dahallhi8m6wa9vpklklqmxafx4rplrr8ph"; - }) (substituteAll { src = ../../clang-11-12-LLVMgold-path.patch; libllvmLibdir = "${libllvm.lib}/lib";