From b26e0bac8dab068e54b0c8ee1bf8fd5fe5683b39 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Thu, 19 Nov 2020 16:57:41 +0900 Subject: [PATCH] bintools-wrapper: set -arch on darwin --- pkgs/build-support/bintools-wrapper/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 8fef2ca6624c..c255f43dfcd8 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -305,6 +305,10 @@ stdenv.mkDerivation { done '' + + optionalString stdenv.targetPlatform.isDarwin '' + echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/libc-ldflags + '' + + '' for flags in "$out/nix-support"/*flags*; do substituteInPlace "$flags" --replace $'\n' ' '