diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b48b679403c..dc4346ec048 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2018-09-10 Sergio Durigan Junior + + PR gdb/23555 + PR gdb/23558 + * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation + guesses. + 2018-09-10 Sergio Durigan Junior Revert: diff --git a/gdb/gnulib/import/m4/getcwd-path-max.m4 b/gdb/gnulib/import/m4/getcwd-path-max.m4 index 2531ccff65c..90bbc77dea1 100644 --- a/gdb/gnulib/import/m4/getcwd-path-max.m4 +++ b/gdb/gnulib/import/m4/getcwd-path-max.m4 @@ -209,9 +209,21 @@ main () 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; *) gl_cv_func_getcwd_path_max=no;; esac], - [case "$host_os" in - aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; - *) gl_cv_func_getcwd_path_max=no;; - esac]) + [# Cross-compilation guesses: + case "$host_os" in + aix*) # On AIX, it has the AIX bug. + gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;; + gnu*) # On Hurd, it is 'yes'. + gl_cv_func_getcwd_path_max=yes ;; + linux* | kfreebsd*) + # On older Linux+glibc it's 'no, but it is partly working', + # on newer Linux+glibc it's 'yes'. + # On Linux+musl libc, it's 'no, but it is partly working'. + # On kFreeBSD+glibc, it's 'no, but it is partly working'. + gl_cv_func_getcwd_path_max='no, but it is partly working' ;; + *) # If we don't know, assume the worst. + gl_cv_func_getcwd_path_max=no ;; + esac + ]) ]) ])