Skip to content

Commit

Permalink
stable/build: Do not convert warnings to error
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Dan Horák <dan@danny.cz>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Jan 29, 2020
1 parent f929203 commit 179d53d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile.main
Expand Up @@ -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
Expand Down

0 comments on commit 179d53d

Please sign in to comment.