From dff0ba38a243603534c99f2cf1af81c793cad98e Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Tue, 14 Mar 2017 00:30:01 +0200 Subject: bash: Set bash_cv_getcwd_malloc=yes when cross compiling Because if you don't, the configure script assumes that your getcwd() function is broken. Which then makes bash use it's own getcwd() implementation, which doesn't work if the path to the current directory contains bind mounts in its paths. This shows up as: shell-init: error retrieving current directory: getcwd: cannot access parent directories: Bad file descriptor ... and fails the aarch64 glibc build with sandboxes enabled. Sigh. --- pkgs/shells/bash/4.4.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/shells/bash') diff --git a/pkgs/shells/bash/4.4.nix b/pkgs/shells/bash/4.4.nix index 7dbb1832497..682123d924e 100644 --- a/pkgs/shells/bash/4.4.nix +++ b/pkgs/shells/bash/4.4.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { crossAttrs = { configureFlags = baseConfigureFlags + - " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing" + + " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing bash_cv_getcwd_malloc=yes" + optionalString stdenv.isCygwin '' --without-libintl-prefix --without-libiconv-prefix --with-installed-readline -- cgit 1.4.1