aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-07 13:53:16 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-07 13:53:16 -0800
commitb40487005223a78c3bb4c300ef6c436b3f6ec1f7 (patch)
treeba7d948fe914e8b0b688f7a07aaa89523dcb539d
parentdeadfeba35cdf39d6647b15f9435975a981928d6 (diff)
downloadsyslinux-b40487005223a78c3bb4c300ef6c436b3f6ec1f7.tar.gz
syslinux-b40487005223a78c3bb4c300ef6c436b3f6ec1f7.tar.xz
syslinux-b40487005223a78c3bb4c300ef6c436b3f6ec1f7.zip
Makefile: allow the user to set additional warning flags
Make the variable WARNOPT available for the user to set additional warning options, e.g. to quiet new compiler warnings. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r--mk/build.mk2
-rw-r--r--mk/syslinux.mk3
2 files changed, 3 insertions, 2 deletions
diff --git a/mk/build.mk b/mk/build.mk
index 0ca82bea..9becd412 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -18,7 +18,7 @@ include $(MAKEDIR)/syslinux.mk
OPTFLAGS = -g -Os
INCLUDES =
-CFLAGS = -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
+CFLAGS = $(WARNFLAGS) -D_FILE_OFFSET_BITS=64 \
$(OPTFLAGS) $(INCLUDES)
LDFLAGS =
LIBS =
diff --git a/mk/syslinux.mk b/mk/syslinux.mk
index 46355c9e..d4a2e079 100644
--- a/mk/syslinux.mk
+++ b/mk/syslinux.mk
@@ -79,7 +79,8 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
ARCH ?= $(strip $(SUBARCH))
# Common warnings we want for all gcc-generated code
-GCCWARN = -W -Wall -Wstrict-prototypes $(DEBUGOPT)
+# WARNOPT is available for the user to specify additional warning flags
+GCCWARN = -W -Wall -Wstrict-prototypes $(DEBUGOPT) $(WARNOPT)
# Common stanza to make gcc generate .*.d dependency files
MAKEDEPS = -MT $@ -MD -MF $(dir $@).$(notdir $@).d