Commit f30171bf authored by Sergio Durigan Junior's avatar Sergio Durigan Junior Committed by Joel Brobecker
Browse files

fix incorrect gnulib getcwd replacement when cross-compiling GDB

This fixes a GDB crash observed on Android 8.0 when GDB was
cross-compiled. This patch is a backport of a patch pushed
upstream in gnulib.

gdb/ChangeLog (Sergio Durigan Junior  <sergiodj@redhat.com>):

        PR gdb/23558
        * gnulib/import/m4/getcwd-path-max.m4: Add handling of Hurd,
        Linux and kFreeBSD platforms.
        * gnulib/configure: Regenerate.
parent ad56973e
2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
PR gdb/23558
* gnulib/import/m4/getcwd-path-max.m4: Add handling of Hurd,
Linux and kFreeBSD platforms.
* gnulib/configure: Regenerate.
2018-08-31 Tom Tromey <tom@tromey.com>
* dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
......
......@@ -16389,10 +16389,22 @@ else
# Arrange for deletion of the temporary directory this test creates.
ac_clean_files="$ac_clean_files confdir3"
if test "$cross_compiling" = yes; then :
case "$host_os" in
aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
*) gl_cv_func_getcwd_path_max=no;;
# 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
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
......
......@@ -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
])
])
])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment