about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-11-27 22:05:49 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-11-27 22:05:49 +0000
commitb473b7d88e6829fd0c8a02512b86950dc7089039 (patch)
treedd7007dc040720463965c760456092e91fc07433 /ChangeLog
parentc74a91deaa5de416237c02bbb3e41bda76ca4c7b (diff)
downloadglibc-b473b7d88e6829fd0c8a02512b86950dc7089039.tar.gz
glibc-b473b7d88e6829fd0c8a02512b86950dc7089039.tar.xz
glibc-b473b7d88e6829fd0c8a02512b86950dc7089039.zip
Fix Hurd build with read-only source directory.
The logic for generating sysdeps/mach/hurd/bits/errno.h involves a
stamp file and $(move-if-change).

The temporary file (generated unconditionally) is generated in the
source directory.  This means that even if
sysdeps/mach/hurd/bits/errno.h is up to date, and has an up to date
timestamp, the build will fail if the source directory is read-only.
Even with a writable source directory, multiple concurrent builds for
i686-gnu with the same source directory could race to access the
temporary file (which always has the same name).

This patch uses the build directory for the temporary file instead to
avoid those problems.  (In the case where the file is out of date and
the temporary file does need to be moved to the source directory, if
there are multiple concurrent builds for i686-gnu with the same source
directory, and the source and build directories are on different
filesystems, it's possible there might still be races replacing the
file in the source directory, depending on exactly how mv handles such
cross-filesystem moves.  This is certainly no worse than the present
situation, where such a case would have races regardless of whether
the file is out of date or whether different filesystems are in use.)

Tested with a build-many-glibcs.py build for i686-gnu.

	* sysdeps/mach/hurd/Makefile ($(common-objpfx)stamp-errnos): Use
	$(hurd-objpfx)bits/errno.h-tmp, not $(hurd)/bits/errno.h-tmp.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d08c2d84f1..0d1ddaad43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-11-27  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mach/hurd/Makefile ($(common-objpfx)stamp-errnos): Use
+	$(hurd-objpfx)bits/errno.h-tmp, not $(hurd)/bits/errno.h-tmp.
+
 2018-11-27  Florian Weimer  <fweimer@redhat.com>
 
 	* support/support.h (support_quote_string): Declare.