ia64/xen-unstable

changeset 11619:807fbfb0a0dc

Consolidate the preferable use of a pragma with the feature detection
in the make script.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Mon Sep 25 09:36:11 2006 +0100 (2006-09-25)
parents ab2817b9547b
children e0db5a3a2ef6
files xen/arch/x86/Rules.mk xen/include/xen/compiler.h
line diff
     1.1 --- a/xen/arch/x86/Rules.mk	Mon Sep 25 09:31:11 2006 +0100
     1.2 +++ b/xen/arch/x86/Rules.mk	Mon Sep 25 09:36:11 2006 +0100
     1.3 @@ -44,7 +44,7 @@ CFLAGS  += -mno-red-zone -fpic -fno-reor
     1.4  CFLAGS  += -fno-asynchronous-unwind-tables
     1.5  # -fvisibility=hidden reduces -fpic cost, if it's available
     1.6  CFLAGS  += $(shell $(CC) -v --help 2>&1 | grep " -fvisibility=" | \
     1.7 -             grep -q hidden && echo "-fvisibility=hidden")
     1.8 +             grep -q hidden && echo "-DGCC_HAS_VISIBILITY_ATTRIBUTE")
     1.9  LDFLAGS += -m elf_x86_64
    1.10  x86_32 := n
    1.11  x86_64 := y
     2.1 --- a/xen/include/xen/compiler.h	Mon Sep 25 09:31:11 2006 +0100
     2.2 +++ b/xen/include/xen/compiler.h	Mon Sep 25 09:36:11 2006 +0100
     2.3 @@ -35,7 +35,7 @@
     2.4  #define offsetof(a,b) ((unsigned long)&(((a *)0)->b))
     2.5  #endif
     2.6  
     2.7 -#if defined(__x86_64__) && (__GNUC__ > 3)
     2.8 +#ifdef GCC_HAS_VISIBILITY_ATTRIBUTE
     2.9  /* Results in more efficient PIC code (no indirections through GOT or PLT). */
    2.10  #pragma GCC visibility push(hidden)
    2.11  #endif