binutils-gdb/gdb/gnulib/import
Sergio Durigan Junior e2fc52e745 Fix PR gdb/23558: Use system's 'getcwd' when cross-compiling GDB
This is a backport of a gnulib fix for the following bug:

  https://sourceware.org/bugzilla/show_bug.cgi?id=23558

The problem reported there is about the replacement of 'getcwd' when
cross-compiling GDB.  With our current gnulib copy, the mechanism for
deciding whether to use the system's 'getcwd' or gnulib's version is
too simplistic and pessimistic, so when cross-compiling we always end
up using gnulib's version, which has a limitation: it cannot handle
the situation when the parent directory doesn't have read permissions.

The solution is to backport the following gnulib commit:

  commit a96d2e67052c879b1bcc5bc461722beac75fc372
  Author: Bruno Haible <bruno@clisp.org>
  Date:   Thu Aug 23 21:13:19 2018 +0200

      getcwd: Add cross-compilation guesses.

gdb/ChangeLog:
2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR gdb/23555
	PR gdb/23558
	* gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
	guesses.
2018-09-10 13:52:24 -04:00
..
extra Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
m4 Fix PR gdb/23558: Use system's 'getcwd' when cross-compiling GDB 2018-09-10 13:52:24 -04:00
alloca.c
alloca.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
assure.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
at-func.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
basename-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
canonicalize-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
chdir-long.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
chdir-long.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
cloexec.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
cloexec.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
close.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
closedir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
config.charset Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirent-private.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirent.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirfd.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirname-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dosname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup2.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup-safer.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
errno.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
error.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
error.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
exitfail.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
exitfail.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fchdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fcntl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fcntl.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fd-hook.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fd-hook.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fd-safer.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fdopendir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
filename.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
filenamecat-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
filenamecat.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
flexmember.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
float.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
float.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
float+.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fnmatch_loop.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fnmatch.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fnmatch.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fpucw.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
frexp.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
frexpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fstat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fstatat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getcwd-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getcwd.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getdtablesize.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getlogin_r.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getprogname.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getprogname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
gettext.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
gettimeofday.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glob-libc.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glob.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glob.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
hard-locale.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
hard-locale.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
intprops.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
inttypes.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnan.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnand-nolibm.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnand.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnanl-nolibm.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnanl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
itold.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
limits.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
localcharset.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
localcharset.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
lstat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
Makefile.am Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
Makefile.in Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloca.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloca.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloca.valgrind Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
math.c
math.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbrtowc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsinit.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsrtowcs-impl.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsrtowcs-state.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsrtowcs.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memchr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memchr.valgrind
memmem.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mempcpy.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memrchr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mkdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mkstemp.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-inval.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-inval.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-nothrow.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-nothrow.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
open.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat-die.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat-priv.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat-proc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
opendir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
pathmax.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
pipe-safer.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rawmemchr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rawmemchr.valgrind
readdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
readlink.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
realloc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
ref-add.sin Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
ref-del.sin Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rename.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rewinddir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rmdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
same-inode.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
save-cwd.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
save-cwd.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
secure_getenv.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
setenv.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
signal.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdbool.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stddef.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdint.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdio.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdlib.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
str-two-way.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strchrnul.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strchrnul.valgrind
strdup.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
streq.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strerror-override.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strerror-override.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strerror.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
string.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stripslash.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strnlen1.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strnlen1.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strstr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strtok_r.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_stat.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_time.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_types.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
tempname.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
tempname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
time.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd--.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd-safer.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd.c
unistd.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unsetenv.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
verify.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wchar.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wctype-h.c
wctype.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00