WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] adjust hidden visibility attribute handling

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] adjust hidden visibility attribute handling
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 21 Sep 2006 17:34:52 +0200
Delivery-date: Thu, 21 Sep 2006 08:34:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Consolidate the preferable use of a pragma with the feature detection in the
make script.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2006-09-21/xen/include/xen/compiler.h
===================================================================
--- 2006-09-21.orig/xen/include/xen/compiler.h  2006-09-18 11:37:57.000000000 
+0200
+++ 2006-09-21/xen/include/xen/compiler.h       2006-09-21 11:11:08.000000000 
+0200
@@ -35,7 +35,7 @@
 #define offsetof(a,b) ((unsigned long)&(((a *)0)->b))
 #endif
 
-#if defined(__x86_64__) && (__GNUC__ > 3)
+#ifdef GCC_HAS_VISIBILITY_ATTRIBUTE
 /* Results in more efficient PIC code (no indirections through GOT or PLT). */
 #pragma GCC visibility push(hidden)
 #endif
Index: 2006-09-21/xen/arch/x86/Rules.mk
===================================================================
--- 2006-09-21.orig/xen/arch/x86/Rules.mk       2006-09-18 11:37:56.000000000 
+0200
+++ 2006-09-21/xen/arch/x86/Rules.mk    2006-09-21 11:12:15.000000000 +0200
@@ -44,7 +44,7 @@ CFLAGS  += -mno-red-zone -fpic -fno-reor
 CFLAGS  += -fno-asynchronous-unwind-tables
 # -fvisibility=hidden reduces -fpic cost, if it's available
 CFLAGS  += $(shell $(CC) -v --help 2>&1 | grep " -fvisibility=" | \
-             grep -q hidden && echo "-fvisibility=hidden")
+             grep -q hidden && echo "-DGCC_HAS_VISIBILITY_ATTRIBUTE")
 LDFLAGS += -m elf_x86_64
 x86_32 := n
 x86_64 := y


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] adjust hidden visibility attribute handling, Jan Beulich <=