]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/host-x86_64/dist-mips-linux/patches/glibc/2.23/0001-MIPS-SPARC-fix-wrong-vfork-aliases-in-libpthread.so.patch
Upgrade dist-mips*-linux to ubuntu:22.04 + crosstool-ng
[rust.git] / src / ci / docker / host-x86_64 / dist-mips-linux / patches / glibc / 2.23 / 0001-MIPS-SPARC-fix-wrong-vfork-aliases-in-libpthread.so.patch
1 From 43c2948756bb6e144c7b871e827bba37d61ad3a3 Mon Sep 17 00:00:00 2001
2 From: Aurelien Jarno <aurelien@aurel32.net>
3 Date: Sat, 18 Jun 2016 19:11:23 +0200
4 Subject: [PATCH 1/2] MIPS, SPARC: fix wrong vfork aliases in libpthread.so
5
6 With recent binutils versions the GNU libc fails to build on at least
7 MISP and SPARC, with this kind of error:
8
9   /home/aurel32/glibc/glibc-build/nptl/libpthread.so:(*IND*+0x0): multiple definition of `vfork@GLIBC_2.0'
10   /home/aurel32/glibc/glibc-build/nptl/libpthread.so::(.text+0xee50): first defined here
11
12 It appears that on these architectures pt-vfork.S includes vfork.S
13 (through the alpha version of pt-vfork.S) and that the __vfork aliases
14 are not conditionalized on IS_IN (libc) like on other architectures.
15 Therefore the aliases are also wrongly included in libpthread.so.
16
17 Fix this by properly conditionalizing the aliases like on other
18 architectures.
19
20 Changelog:
21         * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Conditionalize
22         hidden_def, weak_alias and strong_alias on [IS_IN (libc)].
23         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
24         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
25 ---
26  sysdeps/unix/sysv/linux/mips/vfork.S | 2 ++
27  1 file changed, 2 insertions(+)
28
29 diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S
30 index 8c6615143708..c0c0ce699159 100644
31 --- a/sysdeps/unix/sysv/linux/mips/vfork.S
32 +++ b/sysdeps/unix/sysv/linux/mips/vfork.S
33 @@ -106,6 +106,8 @@ L(error):
34  #endif
35         END(__vfork)
36  
37 +#if IS_IN (libc)
38  libc_hidden_def(__vfork)
39  weak_alias (__vfork, vfork)
40  strong_alias (__vfork, __libc_vfork)
41 +#endif
42 -- 
43 2.37.3
44