From: "Jan Beulich" <jbeulich@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] adjust hidden visibility attribute handling
Date: Thu, 21 Sep 2006 17:34:52 +0200 [thread overview]
Message-ID: <4512CD3C.76E4.0078.0@novell.com> (raw)
Consolidate the preferable use of a pragma with the feature detection in the
make script.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
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
reply other threads:[~2006-09-21 15:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4512CD3C.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.