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.
This commit is contained in:
Tuomas Tynkkynen 2017-03-14 00:30:01 +02:00
parent 40c1406b18
commit dff0ba38a2

View file

@ -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