Skip to content

Commit

Permalink
glibc, openssl: unbreak cross eval (with minor caveats)
Browse files Browse the repository at this point in the history
It's certainly better to have those two caveats than not evaluate.
Both seem rather niche.  Unfortunately I failed to find a better way.
I started testing builds of several cross variants; all seem OK.
  • Loading branch information
vcunat committed Feb 10, 2020
1 parent b94c1c8 commit c203848
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkgs/development/libraries/glibc/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ stdenv.mkDerivation ({
# nscd needs libgcc, and we don't want it dynamically linked
# because we don't want it to depend on bootstrap-tools libs.
echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile
''
# FIXME: find a solution for infinite recursion in cross builds.
# For now it's hopefully acceptable that IDN from libc doesn't reliably work.
+ lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
# Ensure that libidn2 is found.
patch -p 1 <<EOF
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/libraries/openssl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ let

outputs = [ "bin" "dev" "out" "man" ] ++ optional withDocs "doc";
setOutputFlags = false;
separateDebugInfo = !(stdenv.hostPlatform.useLLVM or false) && stdenv.cc.isGNU;
separateDebugInfo = !(stdenv.hostPlatform.useLLVM or false)
&& stdenv.hostPlatform == stdenv.buildPlatform # unable to fix infinite recursion on stdenv.cc
&& stdenv.cc.isGNU;

nativeBuildInputs = [ perl ];
buildInputs = stdenv.lib.optional withCryptodev cryptodev;
Expand Down

0 comments on commit c203848

Please sign in to comment.