* [gentoo-commits] gentoo commit in src/patchsets/glibc/2.7: 6018_all_glibc-ptr-mangling.patch README.history
@ 2007-12-11 4:53 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2007-12-11 4:53 UTC (permalink / raw
To: gentoo-commits
vapier 07/12/11 04:53:48
Modified: README.history
Added: 6018_all_glibc-ptr-mangling.patch
Log:
fix compiling for alpha #201910
Revision Changes Path
1.7 src/patchsets/glibc/2.7/README.history
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?r1=1.6&r2=1.7
Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.7/README.history,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- README.history 10 Dec 2007 01:23:10 -0000 1.6
+++ README.history 11 Dec 2007 04:53:48 -0000 1.7
@@ -1,3 +1,6 @@
+1.4 10.12.2007
+ + 6018_all_glibc-ptr-mangling.patch
+
1.3 09.12.2007
+ 0040_all_glibc-i586-chk.patch
+ 0050_all_glibc-2.7-sscanf-as-BZ5441.patch
1.1 src/patchsets/glibc/2.7/6018_all_glibc-ptr-mangling.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6018_all_glibc-ptr-mangling.patch?rev=1.1&view=markup
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
Index: 6018_all_glibc-ptr-mangling.patch
===================================================================
http://bugs.gentoo.org/201910
For every arch, PTR_MANGLE and PTR_DEMANGLE defines are in
sysdeps/unix/sysv/linux/<arch>/sysdep.h. But for alpha this is not true. The
defines are in sysdeps/unix/alpha/sysdep.h and unix/sysv/linux/alpha/sysdep.h
includes the first.
This is a patch that fixes the issue and let alpha build, at the expense of
disabling MANGLING in the non PIC case, but googling showed that the issue is
known, and that nobody really cares about it.
Info from: http://sourceware.org/bugzilla/show_bug.cgi?id=5216
--- sysdeps/unix/alpha/sysdep.h
+++ sysdeps/unix/alpha/sysdep.h
@@ -397,42 +397,4 @@ __LABEL(name) \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
-/* Pointer mangling support. Note that tls access is slow enough that
- we don't deoptimize things by placing the pointer check value there. */
-
-#include <stdint.h>
-
-#if defined NOT_IN_libc && defined IS_IN_rtld
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(dst, src, tmp) \
- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
- xor src, tmp, dst
-# define PTR_MANGLE2(dst, src, tmp) \
- xor src, tmp, dst
-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
-# define PTR_MANGLE(var) \
- (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
-# endif
-#elif defined PIC
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(dst, src, tmp) \
- ldq tmp, __pointer_chk_guard; \
- xor src, tmp, dst
-# define PTR_MANGLE2(dst, src, tmp) \
- xor src, tmp, dst
-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard attribute_relro;
-# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
-# endif
-#endif
-
#endif /* ASSEMBLER */
--- sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -98,4 +98,46 @@
INTERNAL_SYSCALL1(name, err_out, nr, args); \
})
+/* Pointer mangling support. Note that tls access is slow enough that
+ we don't deoptimize things by placing the pointer check value there. */
+
+#if defined NOT_IN_libc && defined IS_IN_rtld
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(dst, src, tmp) \
+ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
+ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
+ xor src, tmp, dst
+# define PTR_MANGLE2(dst, src, tmp) \
+ xor src, tmp, dst
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
+# define PTR_MANGLE(var) \
+ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
+# endif
+#elif defined PIC
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(dst, src, tmp) \
+ ldq tmp, __pointer_chk_guard; \
+ xor src, tmp, dst
+# define PTR_MANGLE2(dst, src, tmp) \
+ xor src, tmp, dst
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard attribute_relro;
+# define PTR_MANGLE(var) \
+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
+# endif
+#else
+/* Pointer mangling is not yet supported for static libc on alpha. */
+# ifndef __ASSEMBLER__
+# define PTR_MANGLE(var) (void) (var)
+# define PTR_DEMANGLE(var) (void) (var)
+# endif
+#endif
+
#endif /* _LINUX_ALPHA_SYSDEP_H */
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-11 4:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-11 4:53 [gentoo-commits] gentoo commit in src/patchsets/glibc/2.7: 6018_all_glibc-ptr-mangling.patch README.history Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox