[syslinux:master] Makefile: allow the user to set additional warning flags
syslinux-bot for H. Peter Anvin (Intel)
hpa at zytor.com
Wed Feb 20 17:55:14 PST 2019
Commit-ID: b40487005223a78c3bb4c300ef6c436b3f6ec1f7
Gitweb: http://www.syslinux.org/commit/b40487005223a78c3bb4c300ef6c436b3f6ec1f7
Author: H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Thu, 7 Feb 2019 13:53:16 -0800
Committer: H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Thu, 7 Feb 2019 13:53:16 -0800
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 at zytor.com>
---
mk/build.mk | 2 +-
mk/syslinux.mk | 3 ++-
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
More information about the Syslinux-commits
mailing list