diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2019-02-07 13:53:16 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2019-02-07 13:53:16 -0800 |
commit | b40487005223a78c3bb4c300ef6c436b3f6ec1f7 (patch) | |
tree | ba7d948fe914e8b0b688f7a07aaa89523dcb539d | |
parent | deadfeba35cdf39d6647b15f9435975a981928d6 (diff) | |
download | syslinux-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.mk | 2 | ||||
-rw-r--r-- | 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 |