summary refs log tree commit diff
path: root/pkgs/shells/bash
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2017-03-14 00:30:01 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-03-14 00:33:29 +0200
commitdff0ba38a243603534c99f2cf1af81c793cad98e (patch)
tree6192303320542295be14554ac625b240fe55ecb2 /pkgs/shells/bash
parent40c1406b18b2c9a1ff43f1c1811a34ec5e82570f (diff)
downloadnixpkgs-dff0ba38a243603534c99f2cf1af81c793cad98e.tar
nixpkgs-dff0ba38a243603534c99f2cf1af81c793cad98e.tar.gz
nixpkgs-dff0ba38a243603534c99f2cf1af81c793cad98e.tar.bz2
nixpkgs-dff0ba38a243603534c99f2cf1af81c793cad98e.tar.lz
nixpkgs-dff0ba38a243603534c99f2cf1af81c793cad98e.tar.xz
nixpkgs-dff0ba38a243603534c99f2cf1af81c793cad98e.tar.zst
nixpkgs-dff0ba38a243603534c99f2cf1af81c793cad98e.zip
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.
Diffstat (limited to 'pkgs/shells/bash')
-rw-r--r--pkgs/shells/bash/4.4.nix2
1 files changed, 1 insertions, 1 deletions
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