From 1c0b060295ce4abcf329b2f4a94a523377de26b4 Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Fri, 30 Oct 2015 14:38:07 +0000 Subject: [PATCH] openssl: use prefixed windres and ranlib for cross build --- pkgs/development/libraries/openssl/1.0.2.x.nix | 9 ++++++++- pkgs/development/libraries/openssl/default.nix | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openssl/1.0.2.x.nix b/pkgs/development/libraries/openssl/1.0.2.x.nix index 28254cb390d4..9175da0bca4b 100644 --- a/pkgs/development/libraries/openssl/1.0.2.x.nix +++ b/pkgs/development/libraries/openssl/1.0.2.x.nix @@ -66,11 +66,18 @@ stdenv.mkDerivation rec { ''; crossAttrs = { + # upstream patch: https://rt.openssl.org/Ticket/Display.html?id=2558 + postPatch = '' + sed -i -e 's/[$][(]CROSS_COMPILE[)]windres/$(WINDRES)/' Makefile.shared + ''; preConfigure='' # It's configure does not like --build or --host export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}" + # WINDRES and RANLIB need to be prefixed when cross compiling; + # the openssl configure script doesn't do that for us + export WINDRES=${stdenv.cross.config}-windres + export RANLIB=${stdenv.cross.config}-ranlib ''; - configureScript = "./Configure"; }; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index ca3e7999f9be..5ed30731a684 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -69,11 +69,18 @@ stdenv.mkDerivation rec { ''; crossAttrs = { + # upstream patch: https://rt.openssl.org/Ticket/Display.html?id=2558 + postPatch = '' + sed -i -e 's/[$][(]CROSS_COMPILE[)]windres/$(WINDRES)/' Makefile.shared + ''; preConfigure='' # It's configure does not like --build or --host export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}" + # WINDRES and RANLIB need to be prefixed when cross compiling; + # the openssl configure script doesn't do that for us + export WINDRES=${stdenv.cross.config}-windres + export RANLIB=${stdenv.cross.config}-ranlib ''; - configureScript = "./Configure"; };