From: Andi Kleen <andi@firstfloor.org>
To: git@vger.kernel.org
Cc: Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 2/5] Don't define away __attribute__ on gcc
Date: Fri, 4 Jul 2014 16:43:49 -0700 [thread overview]
Message-ID: <1404517432-25185-3-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1404517432-25185-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
Profile feedback sets -DNO_NORETURN, which causes the compat
header file to go into a default #else block. That #else
block defines away __attribute__(). Doing so causes all
kinds of problems with the Linux and gcc system headers:
in particular it makes the xmmintrin.h headers error out,
breaking the build.
Don't define away __attribute__ when __GNUC__ is set.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
git-compat-util.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index 96f5554..01e8695 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -291,10 +291,12 @@ extern char *gitbasename(char *);
#else
#define NORETURN
#define NORETURN_PTR
+#ifndef __GNUC__
#ifndef __attribute__
#define __attribute__(x)
#endif
#endif
+#endif
/* The sentinel attribute is valid from gcc version 4.0 */
#if defined(__GNUC__) && (__GNUC__ >= 4)
--
2.0.1
next prev parent reply other threads:[~2014-07-04 23:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 23:43 Fix the bitrotted profile feedback build Andi Kleen
2014-07-04 23:43 ` [PATCH 1/5] Use BASIC_FLAGS for profile feedback Andi Kleen
2014-07-04 23:43 ` Andi Kleen [this message]
2014-07-04 23:43 ` [PATCH 3/5] Run the perf test suite for profile feedback too Andi Kleen
2014-07-07 21:06 ` Junio C Hamano
2014-07-07 22:15 ` Andi Kleen
2014-07-04 23:43 ` [PATCH 4/5] Fix profile feedback with -jN and add profile-fast Andi Kleen
2014-07-04 23:43 ` [PATCH 5/5] Add a little script to compare two make perf runs Andi Kleen
2014-07-06 16:12 ` Bert Wesarg
2014-07-06 16:15 ` Andi Kleen
2014-07-06 16:46 ` Bert Wesarg
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=1404517432-25185-3-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).