Re: [kvm-unit-tests PATCH] Use -Wno-frame-address alongside using -Wall and -Werror

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paolo, ping?

I've updated to F24, which has later gcc, and now need to carry
this patch in my local tree.

Thanks,
drew

On Thu, Jun 23, 2016 at 05:01:01PM +1000, Cyril Bur wrote:
> Quote from https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
> 
> -Wframe-address
>   Warn when the ‘__builtin_frame_address’ or ‘__builtin_return_address’
>   is called with an argument greater than 0. Such calls may return
>   indeterminate values or crash the program. The warning is included in
>   -Wall.
> 
> Is being inforced in GCC 6.1.x at least on POWERPC. Removing -Werror
> (or -Wall) is unwise and since the stacktrace code uses
> __builtin_return_address with a non zero argument for exactly the
> intentended purpose, -Wno-frame-address is the correct solution.
> 
> Signed-off-by: Cyril Bur <cyrilbur@xxxxxxxxx>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index bed6ed3..0ffe234 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -45,7 +45,7 @@ cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
>                > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
>  
>  CFLAGS += -g
> -CFLAGS += $(autodepend-flags) -Wall -Werror
> +CFLAGS += $(autodepend-flags) -Wall -Werror -Wno-frame-address
>  frame-pointer-flag=-f$(if $(KEEP_FRAME_POINTER),no-,)omit-frame-pointer
>  fomit_frame_pointer := $(call cc-option, $(frame-pointer-flag), "")
>  fnostack_protector := $(call cc-option, -fno-stack-protector, "")
> -- 
> 2.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux