From 6520c84685660fc995a405d7b7511a903fc12e18 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 18 Jun 2011 18:07:03 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- git-compat-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-compat-util.h') 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) -- cgit v1.2.3