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] MIPS, SPARC: fix wrong vfork aliases in libpthread.so
6 With recent binutils versions the GNU libc fails to build on at least
7 MISP and SPARC, with this kind of error:
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
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.
17 Fix this by properly conditionalizing the aliases like on other
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.
26 [Vincent: do not patch ChangeLog]
28 Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
30 sysdeps/unix/sysv/linux/mips/vfork.S | 2 ++
31 sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S | 2 ++
32 sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S | 2 ++
33 3 files changed, 6 insertions(+)
35 diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S
36 index 8c66151..c0c0ce6 100644
37 --- a/sysdeps/unix/sysv/linux/mips/vfork.S
38 +++ b/sysdeps/unix/sysv/linux/mips/vfork.S
39 @@ -106,6 +106,8 @@ L(error):
44 libc_hidden_def(__vfork)
45 weak_alias (__vfork, vfork)
46 strong_alias (__vfork, __libc_vfork)
48 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
49 index dc32e0a..94f2c8d 100644
50 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
51 +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
52 @@ -44,6 +44,8 @@ ENTRY(__vfork)
57 libc_hidden_def (__vfork)
58 weak_alias (__vfork, vfork)
59 strong_alias (__vfork, __libc_vfork)
61 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
62 index 05be3c2..a7479e9 100644
63 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
64 +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
65 @@ -44,6 +44,8 @@ ENTRY(__vfork)
70 libc_hidden_def (__vfork)
71 weak_alias (__vfork, vfork)
72 strong_alias (__vfork, __libc_vfork)