From 41e34e76d8802feaa9c13f88a5f032c529fc74e9 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Thu, 27 Aug 2020 12:38:31 -0400 Subject: [PATCH] gcc: Only use strip -x if building libgccjit on darwin It's not necessary to use strip -x otherwise, so let's just use it for the JIT library. --- pkgs/development/compilers/gcc/9/default.nix | 2 +- .../compilers/gcc/common/pre-configure.nix | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 5f0a69583a1..20c34c1f450 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -181,7 +181,7 @@ stdenv.mkDerivation ({ preConfigure = import ../common/pre-configure.nix { inherit (stdenv) lib; - inherit version hostPlatform gnatboot langAda langGo; + inherit version hostPlatform gnatboot langAda langGo langJit; }; dontDisableStatic = true; diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index e4a7cfb4287..1c65b4a8ba6 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -2,6 +2,7 @@ , gnatboot ? null , langAda ? false , langJava ? false +, langJit ? false , langGo }: assert langJava -> lib.versionOlder version "7"; @@ -50,10 +51,10 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export ac_cv_func_aligned_alloc=no '' -# In order to properly install on macOS Catalina, strip(1) upon -# installation must not remove external symbols, otherwise the install -# step errors with "symbols referenced by indirect symbol table -# entries that can't be stripped". -+ lib.optionalString (hostPlatform.isDarwin) '' +# In order to properly install libgccjit on macOS Catalina, strip(1) +# upon installation must not remove external symbols, otherwise the +# install step errors with "symbols referenced by indirect symbol +# table entries that can't be stripped". ++ lib.optionalString (hostPlatform.isDarwin && langJit) '' export STRIP='strip -x' ''