1 |
vapier 07/12/11 04:53:48 |
2 |
|
3 |
Modified: README.history |
4 |
Added: 6018_all_glibc-ptr-mangling.patch |
5 |
Log: |
6 |
fix compiling for alpha #201910 |
7 |
|
8 |
Revision Changes Path |
9 |
1.7 src/patchsets/glibc/2.7/README.history |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.7&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.7&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?r1=1.6&r2=1.7 |
14 |
|
15 |
Index: README.history |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.7/README.history,v |
18 |
retrieving revision 1.6 |
19 |
retrieving revision 1.7 |
20 |
diff -u -r1.6 -r1.7 |
21 |
--- README.history 10 Dec 2007 01:23:10 -0000 1.6 |
22 |
+++ README.history 11 Dec 2007 04:53:48 -0000 1.7 |
23 |
@@ -1,3 +1,6 @@ |
24 |
+1.4 10.12.2007 |
25 |
+ + 6018_all_glibc-ptr-mangling.patch |
26 |
+ |
27 |
1.3 09.12.2007 |
28 |
+ 0040_all_glibc-i586-chk.patch |
29 |
+ 0050_all_glibc-2.7-sscanf-as-BZ5441.patch |
30 |
|
31 |
|
32 |
|
33 |
1.1 src/patchsets/glibc/2.7/6018_all_glibc-ptr-mangling.patch |
34 |
|
35 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6018_all_glibc-ptr-mangling.patch?rev=1.1&view=markup |
36 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6018_all_glibc-ptr-mangling.patch?rev=1.1&content-type=text/plain |
37 |
|
38 |
Index: 6018_all_glibc-ptr-mangling.patch |
39 |
=================================================================== |
40 |
http://bugs.gentoo.org/201910 |
41 |
|
42 |
For every arch, PTR_MANGLE and PTR_DEMANGLE defines are in |
43 |
sysdeps/unix/sysv/linux/<arch>/sysdep.h. But for alpha this is not true. The |
44 |
defines are in sysdeps/unix/alpha/sysdep.h and unix/sysv/linux/alpha/sysdep.h |
45 |
includes the first. |
46 |
|
47 |
This is a patch that fixes the issue and let alpha build, at the expense of |
48 |
disabling MANGLING in the non PIC case, but googling showed that the issue is |
49 |
known, and that nobody really cares about it. |
50 |
|
51 |
Info from: http://sourceware.org/bugzilla/show_bug.cgi?id=5216 |
52 |
|
53 |
--- sysdeps/unix/alpha/sysdep.h |
54 |
+++ sysdeps/unix/alpha/sysdep.h |
55 |
@@ -397,42 +397,4 @@ __LABEL(name) \ |
56 |
_sc_ret = _sc_0, _sc_err = _sc_19; \ |
57 |
} |
58 |
|
59 |
-/* Pointer mangling support. Note that tls access is slow enough that |
60 |
- we don't deoptimize things by placing the pointer check value there. */ |
61 |
- |
62 |
-#include <stdint.h> |
63 |
- |
64 |
-#if defined NOT_IN_libc && defined IS_IN_rtld |
65 |
-# ifdef __ASSEMBLER__ |
66 |
-# define PTR_MANGLE(dst, src, tmp) \ |
67 |
- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ |
68 |
- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ |
69 |
- xor src, tmp, dst |
70 |
-# define PTR_MANGLE2(dst, src, tmp) \ |
71 |
- xor src, tmp, dst |
72 |
-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) |
73 |
-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) |
74 |
-# else |
75 |
-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; |
76 |
-# define PTR_MANGLE(var) \ |
77 |
- (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) |
78 |
-# define PTR_DEMANGLE(var) PTR_MANGLE(var) |
79 |
-# endif |
80 |
-#elif defined PIC |
81 |
-# ifdef __ASSEMBLER__ |
82 |
-# define PTR_MANGLE(dst, src, tmp) \ |
83 |
- ldq tmp, __pointer_chk_guard; \ |
84 |
- xor src, tmp, dst |
85 |
-# define PTR_MANGLE2(dst, src, tmp) \ |
86 |
- xor src, tmp, dst |
87 |
-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) |
88 |
-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) |
89 |
-# else |
90 |
-extern uintptr_t __pointer_chk_guard attribute_relro; |
91 |
-# define PTR_MANGLE(var) \ |
92 |
- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) |
93 |
-# define PTR_DEMANGLE(var) PTR_MANGLE(var) |
94 |
-# endif |
95 |
-#endif |
96 |
- |
97 |
#endif /* ASSEMBLER */ |
98 |
|
99 |
--- sysdeps/unix/sysv/linux/alpha/sysdep.h |
100 |
+++ sysdeps/unix/sysv/linux/alpha/sysdep.h |
101 |
@@ -98,4 +98,46 @@ |
102 |
INTERNAL_SYSCALL1(name, err_out, nr, args); \ |
103 |
}) |
104 |
|
105 |
+/* Pointer mangling support. Note that tls access is slow enough that |
106 |
+ we don't deoptimize things by placing the pointer check value there. */ |
107 |
+ |
108 |
+#if defined NOT_IN_libc && defined IS_IN_rtld |
109 |
+# ifdef __ASSEMBLER__ |
110 |
+# define PTR_MANGLE(dst, src, tmp) \ |
111 |
+ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ |
112 |
+ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ |
113 |
+ xor src, tmp, dst |
114 |
+# define PTR_MANGLE2(dst, src, tmp) \ |
115 |
+ xor src, tmp, dst |
116 |
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) |
117 |
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) |
118 |
+# else |
119 |
+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; |
120 |
+# define PTR_MANGLE(var) \ |
121 |
+ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) |
122 |
+# define PTR_DEMANGLE(var) PTR_MANGLE(var) |
123 |
+# endif |
124 |
+#elif defined PIC |
125 |
+# ifdef __ASSEMBLER__ |
126 |
+# define PTR_MANGLE(dst, src, tmp) \ |
127 |
+ ldq tmp, __pointer_chk_guard; \ |
128 |
+ xor src, tmp, dst |
129 |
+# define PTR_MANGLE2(dst, src, tmp) \ |
130 |
+ xor src, tmp, dst |
131 |
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) |
132 |
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) |
133 |
+# else |
134 |
+extern uintptr_t __pointer_chk_guard attribute_relro; |
135 |
+# define PTR_MANGLE(var) \ |
136 |
+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) |
137 |
+# define PTR_DEMANGLE(var) PTR_MANGLE(var) |
138 |
+# endif |
139 |
+#else |
140 |
+/* Pointer mangling is not yet supported for static libc on alpha. */ |
141 |
+# ifndef __ASSEMBLER__ |
142 |
+# define PTR_MANGLE(var) (void) (var) |
143 |
+# define PTR_DEMANGLE(var) (void) (var) |
144 |
+# endif |
145 |
+#endif |
146 |
+ |
147 |
#endif /* _LINUX_ALPHA_SYSDEP_H */ |
148 |
|
149 |
|
150 |
|
151 |
-- |
152 |
gentoo-commits@g.o mailing list |