Message ID | 20191212053311.11437-1-hegdevasant@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
Series | [v2] stable/build: Do not convert warnings to error | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
On Thu, 12 Dec 2019 11:03:11 +0530 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> wrote: > During skiboot build, by default we convert all warnings to error. > Because of this sometime skiboot stable branch fails to build on > modern compiler. And we endup backporting build failure fixes to > stable branches. > > Hence lets disable `-Werror` on skiboot stable branches (tagged > version). LGTM Reviewed-by: Dan Horák <dan@danny.cz> Dan > Suggested-by: Oliver O'Halloran <oohall@gmail.com> > Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> > --- > Makefile.main | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/Makefile.main b/Makefile.main > index 4d7ebcec9..5803d883b 100644 > --- a/Makefile.main > +++ b/Makefile.main > @@ -31,8 +31,17 @@ CWARNS := -Wall -Wundef -Wstrict-prototypes > -Wno-trigraphs \ -Wno-pointer-sign -Wextra -Wno-sign-compare \ > -Wmissing-prototypes -Wmissing-declarations \ > -Wwrite-strings -Wcast-align \ > - -Winit-self \ > - -Werror > + -Winit-self > + > +# Do not convert warnings to error on tagged/released version > +GIT_DIR ?= $(shell test -e $(SRC)/.git && echo 1 || echo 0) > +ifeq ($(GIT_DIR),1) # Building from git tree > +GIT_SHA ?= $(shell cd $(SRC); git describe --tags 2>/dev/null) > +GIT_TAG ?= $(shell cd $(SRC); git tag -l 2>/dev/null | grep -x $ > {GIT_SHA} >/dev/null 2>&1 && echo 1 || echo 0) +ifneq ($(GIT_TAG), > 1) # Development branch +CWARNS += -Werror > +endif > +endif > > # Host tools and options > HOSTCC=gcc > -- > 2.21.0 >
On Thu, Dec 12, 2019 at 4:33 PM Vasant Hegde <hegdevasant@linux.vnet.ibm.com> wrote: > > During skiboot build, by default we convert all warnings to error. > Because of this sometime skiboot stable branch fails to build on > modern compiler. And we endup backporting build failure fixes to > stable branches. > > Hence lets disable `-Werror` on skiboot stable branches (tagged version). > > Suggested-by: Oliver O'Halloran <oohall@gmail.com> > Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Thanks, merged as 179d53dfcca30436777b0c748d530a979bbc8a45
diff --git a/Makefile.main b/Makefile.main index 4d7ebcec9..5803d883b 100644 --- a/Makefile.main +++ b/Makefile.main @@ -31,8 +31,17 @@ CWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -Wno-pointer-sign -Wextra -Wno-sign-compare \ -Wmissing-prototypes -Wmissing-declarations \ -Wwrite-strings -Wcast-align \ - -Winit-self \ - -Werror + -Winit-self + +# Do not convert warnings to error on tagged/released version +GIT_DIR ?= $(shell test -e $(SRC)/.git && echo 1 || echo 0) +ifeq ($(GIT_DIR),1) # Building from git tree +GIT_SHA ?= $(shell cd $(SRC); git describe --tags 2>/dev/null) +GIT_TAG ?= $(shell cd $(SRC); git tag -l 2>/dev/null | grep -x ${GIT_SHA} >/dev/null 2>&1 && echo 1 || echo 0) +ifneq ($(GIT_TAG),1) # Development branch +CWARNS += -Werror +endif +endif # Host tools and options HOSTCC=gcc
During skiboot build, by default we convert all warnings to error. Because of this sometime skiboot stable branch fails to build on modern compiler. And we endup backporting build failure fixes to stable branches. Hence lets disable `-Werror` on skiboot stable branches (tagged version). Suggested-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> --- Makefile.main | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)