[Skiboot] [PATCH] Makefile: Separate CFLAGS and HOSTCFLAGS warning flags

Patrick Williams III iawillia at us.ibm.com
Wed Aug 5 21:45:16 AEST 2015


Recommend adding 'Fixes open-power/skiboot#19' to commit message for
github.

Otherwise,

Reviewed-by: Patrick Williams <iawillia at us.ibm.com>

Sent from my iPhone

> On Aug 5, 2015, at 2:49 AM, Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
wrote:
>
> Some warnings may not be supported in older host compilers - remove them
> from HOSTCFLAGS but keep them for CFLAGS
>
> Removed from HOSTCFLAGS:
>    -Wjump-misses-init
>    -Wsuggest-attribute=const
>    -Wsuggest-attribute=noreturn
>    -Wstack-usage=1024
>
> Signed-off-by: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
> ---
> Makefile.main | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.main b/Makefile.main
> index 48d8b8d..2d929b6 100644
> --- a/Makefile.main
> +++ b/Makefile.main
> @@ -26,10 +26,20 @@ CWARNS := -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs \
>      -Wframe-larger-than=1024 -Wstack-usage=1024 \
>      -Werror -Wno-error=format
>
> +# Host base warnings
> +HOSTCWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
> +      -Werror-implicit-function-declaration
-Wdeclaration-after-statement \
> +      -Wno-pointer-sign -Wextra -Wno-sign-compare \
> +      -Wmissing-prototypes -Wmissing-declarations \
> +      -Wwrite-strings -Wcast-align \
> +      -Winit-self \
> +      -Wframe-larger-than=1024 \
> +      -Werror -Wno-error=format
> +
> # Host tools and options
> HOSTCC=gcc
> HOSTEND=$(shell uname -m | sed -e 's/^i.*86$$/LITTLE/' -e
's/^x86.*/LITTLE/' -e 's/^ppc64le/LITTLE/' -e 's/^ppc.*/BIG/')
> -HOSTCFLAGS=-O1 $(CWARNS) -DHAVE_$(HOSTEND)_ENDIAN -MMD
> +HOSTCFLAGS=-O1 $(HOSTCWARNS) -DHAVE_$(HOSTEND)_ENDIAN -MMD
> VALGRIND=valgrind -q --show-reachable=yes --error-exitcode=99
>
> # Target options
> --
> 2.5.0
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20150805/e9c04f3b/attachment.html>


More information about the Skiboot mailing list