From 2923e72443fe791333ee6ec4e3244b60dfca1db5 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Jun 2022 13:37:40 +0100 Subject: [PATCH] darwin.developer_cmds: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream clang-11. Otherwise build fails as: duplicate symbol '_btype_2' in:args.o pr_comment.o --- .../darwin/apple-source-releases/developer_cmds/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix index f2c4ec32146f..18233cfc5227 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix @@ -16,6 +16,10 @@ appleDerivation { --replace "/usr/bin/cpp" "$out/bin/clang-cpp" ''; + # Workaround build failure on -fno-common toolchains: + # duplicate symbol '_btype_2' in:args.o pr_comment.o + NIX_CFLAGS_COMPILE = "-fcommon"; + # temporary install phase until xcodebuild has "install" support installPhase = '' for f in Products/Release/*; do