From 7d6048d0adac9b952e3f9c8b9f8fadde514c9324 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Jun 2022 14:03:04 +0100 Subject: [PATCH] darwin.file_cmds: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream clang-11. Otherwise build fails as: duplicate symbol '_chdname' in: ar_io.o tty_subs.o --- .../darwin/apple-source-releases/file_cmds/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix index 981e1370437d..cfa66d2c3536 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix @@ -17,6 +17,10 @@ appleDerivation { sed -i -re "s/name = ([a-zA-Z]+);/name = \1; productName = \1;/" file_cmds.xcodeproj/project.pbxproj ''; + # Workaround build failure on -fno-common toolchains: + # duplicate symbol '_chdname' in: ar_io.o tty_subs.o + NIX_CFLAGS_COMPILE = "-fcommon"; + # temporary install phase until xcodebuild has "install" support installPhase = '' for f in Products/Release/*; do