BUILD: makefile: make the ERR variable also support 0
It's among the options that change a lot on the developer's side and it's tempting to change from ERR=1 to ERR=0 on the make command line by reusing the history, except it doesn't work. Let's explictily permit ERR=0 to disable -Werror like ERR= does.
This commit is contained in:
parent
947e5fdfca
commit
617e646ec0
8
INSTALL
8
INSTALL
@ -662,10 +662,10 @@ It is not wise to disable it on uncommon systems, because it's often the only
|
|||||||
way to get a usable core when you need one. Otherwise, you can set DEBUG to
|
way to get a usable core when you need one. Otherwise, you can set DEBUG to
|
||||||
'-s' to strip the binary.
|
'-s' to strip the binary.
|
||||||
|
|
||||||
If the ERR variable is set to any non-empty value, then -Werror will be added
|
If the ERR variable is set to any non-empty value other than "0", then -Werror
|
||||||
to the compiler so that any build warning will trigger an error. This is the
|
will be added to the compiler so that any build warning will trigger an error.
|
||||||
recommended way to build when developing, and it is expected that contributed
|
This is the recommended way to build when developing, and it is expected that
|
||||||
patches were tested with ERR=1.
|
contributed patches were tested with ERR=1.
|
||||||
|
|
||||||
The DEBUG variable is used to extend the CFLAGS and is preset to a list of
|
The DEBUG variable is used to extend the CFLAGS and is preset to a list of
|
||||||
build-time options that are known for providing significant reliability
|
build-time options that are known for providing significant reliability
|
||||||
|
2
Makefile
2
Makefile
@ -219,7 +219,7 @@ SPEC_CFLAGS += $(call cc-nowarn,cast-function-type)
|
|||||||
SPEC_CFLAGS += $(call cc-nowarn,string-plus-int)
|
SPEC_CFLAGS += $(call cc-nowarn,string-plus-int)
|
||||||
SPEC_CFLAGS += $(call cc-nowarn,atomic-alignment)
|
SPEC_CFLAGS += $(call cc-nowarn,atomic-alignment)
|
||||||
|
|
||||||
ifneq ($(ERR),)
|
ifneq ($(ERR:0=),)
|
||||||
SPEC_CFLAGS += -Werror
|
SPEC_CFLAGS += -Werror
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user