[oe-commits] Richard Purdie : glibc: Fix x32 make race
git at git.openembedded.org
git at git.openembedded.org
Sun Jun 28 08:46:34 UTC 2015
Module: openembedded-core.git
Branch: fido
Commit: c945453a8453dd6dab5aa5a132bea20e73ae4d6d
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c945453a8453dd6dab5aa5a132bea20e73ae4d6d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Wed May 13 09:08:09 2015 +0100
glibc: Fix x32 make race
On x32 builds, sysd-syscalls appears malformed since the make-target-directory
appears on the wrong line. This causes races during the build process where you can
see failures like:
Assembler messages:
Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/gettimeofday.os: No such file or directory
Assembler messages:
Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/time.os: No such file or directory
The issue is that the carriage return is being escaped when it should
not be. The change to sysd-syscalls with this change:
before:
"""
$(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \
$(..)sysdeps/unix/make-syscalls.sh $(make-target-directory)
(echo '#include <dl-vdso.h>';
"""
after:
"""
$(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \
$(..)sysdeps/unix/make-syscalls.sh
$(make-target-directory)
(echo '#include <dl-vdso.h>';
"""
which ensures the target directory is correctly created. Only x32 uses the vdso
code which contains the bug which is why the error only really appears on x32.
(From OE-Core rev: ae4729ed6c5e5443c42f8825dd85873f06a3570e)
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-core/glibc/glibc/makesyscall.patch | 51 +++++++++++++++++++++++++
meta/recipes-core/glibc/glibc_2.21.bb | 1 +
2 files changed, 52 insertions(+)
diff --git a/meta/recipes-core/glibc/glibc/makesyscall.patch b/meta/recipes-core/glibc/glibc/makesyscall.patch
new file mode 100644
index 0000000..9ab597f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/makesyscall.patch
@@ -0,0 +1,51 @@
+On x32 builds, sysd-syscalls appears malformed since the make-target-directory
+appears on the wrong line. This causes races during the build process where you can
+see failures like:
+
+Assembler messages:
+Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/gettimeofday.os: No such file or directory
+Assembler messages:
+Fatal error: can't create [...]glibc/2.21-r0/build-x86_64-poky-linux-gnux32/time/time.os: No such file or directory
+
+The isue is that the carridge return is being escaped when it should
+not be. The change to sysd-syscalls with this change:
+
+before:
+
+"""
+$(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \
+ $(..)sysdeps/unix/make-syscalls.sh $(make-target-directory)
+ (echo '#include <dl-vdso.h>';
+"""
+
+after:
+
+"""
+$(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,time).os): \
+ $(..)sysdeps/unix/make-syscalls.sh
+ $(make-target-directory)
+ (echo '#include <dl-vdso.h>';
+"""
+
+which ensures the target directory is correctly created. Only x32 uses the vdso
+code which contains the bug which is why the error only really appears on x32.
+
+Upstream Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18409
+Upstream Fix: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d9efd775ba51916b58b899d8b1c8501105a830de
+
+Upstream-Status: Backport
+RP 2015/5/13
+
+Index: git/sysdeps/unix/make-syscalls.sh
+===================================================================
+--- git.orig/sysdeps/unix/make-syscalls.sh
++++ git/sysdeps/unix/make-syscalls.sh
+@@ -278,7 +278,7 @@ while read file srcfile caller syscall a
+ vdso_symver=`echo "$vdso_symver" | sed 's/\./_/g'`
+ echo "\
+ \$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\
+- \$(..)sysdeps/unix/make-syscalls.sh\
++ \$(..)sysdeps/unix/make-syscalls.sh
+ \$(make-target-directory)
+ (echo '#include <dl-vdso.h>'; \\
+ echo 'extern void *${strong}_ifunc (void) __asm (\"${strong}\");'; \\
diff --git a/meta/recipes-core/glibc/glibc_2.21.bb b/meta/recipes-core/glibc/glibc_2.21.bb
index fcef4ff..2b10f80 100644
--- a/meta/recipes-core/glibc/glibc_2.21.bb
+++ b/meta/recipes-core/glibc/glibc_2.21.bb
@@ -26,6 +26,7 @@ SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH} \
file://0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \
file://0001-yes-within-the-path-sets-wrong-config-variables.patch \
file://elf-Makefile-fix-a-typo.patch \
+ file://makesyscall.patch \
${EGLIBCPATCHES} \
"
EGLIBCPATCHES = "\
More information about the Openembedded-commits
mailing list