File tls-no-direct.diff of Package gcc46
Index: gcc/config/i386/linux.h
===================================================================
--- gcc/config/i386/linux.h.orig 2010-03-26 12:58:09.000000000 +0100
+++ gcc/config/i386/linux.h 2010-07-01 16:26:38.000000000 +0200
@@ -32,8 +32,13 @@ along with GCC; see the file COPYING3.
#define DEFAULT_PCC_STRUCT_RETURN 1
/* We arrange for the whole %gs segment to map the tls area. */
+/*
+ This slows down Xen, so take a very small general performance hit
+ for not accessing the %gs segment with negative offsets by making
+ GCC not emit direct accesses to %gs at all.
#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
+*/
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"