summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-06-18 18:07:03 -0700
committerJunio C Hamano <gitster@pobox.com>2011-06-20 12:32:39 -0700
commit6520c84685660fc995a405d7b7511a903fc12e18 (patch)
tree6b23c273559196acb209f9849a832cfabdc43675 /git-compat-util.h
parent28eb1afec90fab398fc58a1d6119b9e99a733f87 (diff)
downloadgit-6520c84685660fc995a405d7b7511a903fc12e18.tar.gz
Add option to disable NORETURN
Due to a bug in gcc 4.6+ it can crash when doing profile feedback with a noreturn function pointer (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299) This adds a Makefile variable to disable noreturns. [Patch by Junio, description by Andi Kleen] Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index e0bb81ed8d..9925cf0edf 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -218,7 +218,7 @@ extern char *gitbasename(char *);
#if __HP_cc >= 61000
#define NORETURN __attribute__((noreturn))
#define NORETURN_PTR
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && !defined(NO_NORETURN)
#define NORETURN __attribute__((__noreturn__))
#define NORETURN_PTR __attribute__((__noreturn__))
#elif defined(_MSC_VER)