Skip to contentSkip to conversation

Makefile: Ensure _GNU_SOURCE really is always defined

PATCH New Seth Forshee 1 participant 1 message Nov 1, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Ensure _GNU_SOURCE really is always defined

When CLFAGS is set with a command argument a normal variable assignment is not sufficient to ensure that _GNU_SOURCE will be defined. Since this really is critical for building, use an override directive when adding it to CFLAGS to ensure that it really does get defined in all cases.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 1d613c4..a2ba385 100644
@@ -223,7 +223,7 @@ CFLAGS ?= -g -Wall
 LDFLAGS ?=
 
 # Required CFLAGS
-CFLAGS += -D_GNU_SOURCE
+override CFLAGS += -D_GNU_SOURCE
 
 ifndef NO_PTRACE
 ifneq ($(call try-cc,$(SOURCE_PTRACE),),y)
Signature · 1 line
1.8.3.2