[Skiboot] [PATCH] stable/build: Do not convert warnings to error

Dan Horák dan at danny.cz
Wed Dec 11 18:38:29 AEDT 2019


On Wed, 11 Dec 2019 12:05:11 +0530
Vasant Hegde <hegdevasant at 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 at gmail.com>
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> ---
>  Makefile.main | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.main b/Makefile.main
> index 4d7ebcec9..e1473cea0 100644
> --- a/Makefile.main
> +++ b/Makefile.main
> @@ -31,8 +31,14 @@ 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 version
> +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 0 || echo 1) +ifneq ($(GIT_TAG),0)

this expects building from git checkout, but will have issues when
building from the released source archive


		Dan


More information about the Skiboot mailing list