From c99904e11307cbade607ad855a29f07694762f37 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Thu, 4 Feb 2021 18:29:29 +0900 Subject: [PATCH] clang_11: revert -fno-common default --- .../compilers/llvm/11/clang/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix index 67b5e0c17fea..f23394a8b754 100644 --- a/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, fetchpatch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -45,6 +45,18 @@ 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"; + }) ]; postPatch = ''