Dash:
[t2-trunk.git] / architecture / sparc / package / glibc / hotfix.patch
blobfe6bd5927a635718a9c3a5328f6df6037df9f954
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: architecture/sparc/package/*/hotfix.patch
5 # Copyright (C) 2021 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 From 3f512ca79fda7854da188df0585e71467119206e Mon Sep 17 00:00:00 2001
18 From: Brett Neumeier <brett@neumeier.us>
19 Date: Mon, 31 Aug 2015 15:27:21 -0700
20 Subject: [PATCH] Fix non-v9 32-bit sparc build.
22 [BZ #18870]
23 * sysdeps/sparc/sparc32/sem_open.c: Add missing #include
24 diff --git a/sysdeps/sparc/sparc32/sem_open.c b/sysdeps/sparc/sparc32/sem_open.c
25 index 16cb9ad591..59df2d7b9b 100644
26 --- a/sysdeps/sparc/sparc32/sem_open.c
27 +++ b/sysdeps/sparc/sparc32/sem_open.c
28 @@ -29,6 +29,7 @@
29 #include <sys/mman.h>
30 #include <sys/stat.h>
31 #include "semaphoreP.h"
32 +#include <futex-internal.h>
33 #include <shm-directory.h>
36 --
37 2.27.0
40 https://sourceware.org/git/?p=glibc.git;a=commit;h=43c2948756bb6e144c7b871e827bba37d61ad3a3
41 https://sourceware.org/git/?p=glibc.git;a=commit;h=b87c1ec3fa398646f042a68f0ce0f7d09c1348c7
43 --- glibc-2.22/sysdeps/sparc/sparc32/fpu/e_sqrtl.c.vanilla 2021-02-09 16:17:34.563253198 +0100
44 +++ glibc-2.22/sysdeps/sparc/sparc32/fpu/e_sqrtl.c 2021-02-09 16:17:53.305254165 +0100
45 @@ -1 +1,28 @@
46 -/* __ieee754_sqrtl is defined in q_sqrt.c. */
47 +/* Long double square root, sparc32 version.
48 + Copyright (C) 2016 Free Software Foundation, Inc.
49 + This file is part of the GNU C Library.
51 + The GNU C Library is free software; you can redistribute it and/or
52 + modify it under the terms of the GNU Lesser General Public
53 + License as published by the Free Software Foundation; either
54 + version 2.1 of the License, or (at your option) any later version.
56 + The GNU C Library is distributed in the hope that it will be useful,
57 + but WITHOUT ANY WARRANTY; without even the implied warranty of
58 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
59 + Lesser General Public License for more details.
61 + You should have received a copy of the GNU Lesser General Public
62 + License along with the GNU C Library; if not, see
63 + <http://www.gnu.org/licenses/>. */
65 +#include <math.h>
67 +extern long double _Q_sqrt(const long double a);
69 +long double
70 +__ieee754_sqrtl (long double x)
72 + return _Q_sqrt (x);
74 +strong_alias (__ieee754_sqrtl, __sqrtl_finite)
75 --- glibc-2.22/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c.vanilla 2021-02-09 16:17:34.565253199 +0100
76 +++ glibc-2.22/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c 2021-02-09 16:17:53.305254165 +0100
77 @@ -35,4 +35,3 @@
78 FP_HANDLE_EXCEPTIONS;
79 return c;
81 -strong_alias (_Q_sqrt, __ieee754_sqrtl);
82 --- glibc-2.22/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist.vanilla 2021-02-09 16:17:34.567253199 +0100
83 +++ glibc-2.22/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist 2021-02-09 16:18:39.514256549 +0100
84 @@ -379,6 +379,7 @@
85 __sinhl_finite F
86 __sqrt_finite F
87 __sqrtf_finite F
88 + __sqrtl_finite F
89 __y0_finite F
90 __y0f_finite F
91 __y0l_finite F
92 --- glibc-2.22/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S.vanilla 2021-02-09 16:21:21.813264922 +0100
93 +++ glibc-2.22/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2021-02-09 16:22:22.169268036 +0100
94 @@ -21,7 +21,7 @@
96 .text
97 .globl __syscall_error
98 -ENTRY(__vfork)
99 +ENTRY(__libc_vfork)
100 ld [%g7 + PID], %o5
101 cmp %o5, 0
102 bne 1f
103 @@ -42,8 +42,10 @@
104 st %o5, [%g7 + PID]
105 1: retl
107 -END(__vfork)
108 +END(__libc_vfork)
110 +#if IS_IN (libc)
111 +weak_alias (__libc_vfork, vfork)
112 +strong_alias (__libc_vfork, __vfork)
113 libc_hidden_def (__vfork)
114 -weak_alias (__vfork, vfork)
115 -strong_alias (__vfork, __libc_vfork)
116 +#endif