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

Re: [Minios-devel] [UNIKRAFT/RUBY PATCH] Makefile.uk: fix compilation warnings for gcc >= 9.0



Thanks for this patch, Ștefan! We should pay attention in the future
whether this change is needed for all the libs, i.e. moving this to
core's Makefile.

Reviewed-by: Costin Lupu <costin.lupu@xxxxxxxxx>

On 12/16/19 4:45 PM, stefanl.teodorescu@xxxxxxxxx wrote:
> From: Stefan Teodorescu <stefanl.teodorescu@xxxxxxxxx>
> 
> In GCC 9.0, a new type of warning was introduced
> (-Waddress-of-packed-member), which shows up multiple times in Ruby
> code. This was disabled for GCC versions >= 9.0.
> 
> Signed-off-by: Stefan Teodorescu <stefanl.teodorescu@xxxxxxxxx>
> ---
>  Makefile.uk | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/Makefile.uk b/Makefile.uk
> index 8333894..dbc398e 100644
> --- a/Makefile.uk
> +++ b/Makefile.uk
> @@ -62,14 +62,15 @@ $(eval $(call 
> patch,libruby,$(LIBRUBY_PATCHDIR),$(LIBRUBY_DIR)))
>  # Global and common flags
>  
> ################################################################################
>  # Suppress flags
> -LIBRUBY_SUPPRESS_FLAGS = -Wno-cast-function-type -Wno-long-long \
> +LIBRUBY_SUPPRESS_FLAGS-y = -Wno-cast-function-type -Wno-long-long \
>       -Wno-missing-field-initializers -Wno-overlength-strings \
>       -Wno-packed-bitfield-compat -Wno-tautological-compare \
>       -Wno-unused-parameter -Wno-unused-value -Wno-implicit-fallthrough \
>       -Wno-unused-but-set-variable
> -LIBRUBY_SUPRESS_CFLAGS-y   += $(LIBRUBY_SUPPRESS_FLAGS) \
> +LIBRUBY_SUPPRESS_FLAGS-$(call gcc_version_ge,9,0) += 
> -Wno-address-of-packed-member
> +LIBRUBY_SUPRESS_CFLAGS-y   += $(LIBRUBY_SUPPRESS_FLAGS-y) \
>       -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
> -LIBRUBY_SUPRESS_CXXFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS)
> +LIBRUBY_SUPRESS_CXXFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS-y)
>  LIBRUBY_CFLAGS-y           += $(LIBRUBY_SUPRESS_CFLAGS-y)
>  LIBRUBY_CXXFLAGS-y         += $(LIBRUBY_SUPRESS_CXXFLAGS-y)
>  
> @@ -192,7 +193,7 @@ LIBRUBY_SRCS-y += $(LIBRUBY_SRC)/addr2line.c
>  # Extensions
>  
> ################################################################################
>  LIBRUBY_EXT_CFLAGS-y += $(LIBRUBY_CINCLUDES-y)
> -LIBRUBY_EXT_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS)
> +LIBRUBY_EXT_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS-y)
>  LIBRUBY_EXT_CFLAGS-y += -DRUBY_EXTCONF_H=\"extconf.h\"
>  
>  ifeq ($(CONFIG_LIBRUBY_MINI),y)
> @@ -472,7 +473,7 @@ endif
>  # Encodings
>  
> ################################################################################
>  LIBRUBY_ENC_CFLAGS-y += $(LIBRUBY_CINCLUDES-y)
> -LIBRUBY_ENC_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS)
> +LIBRUBY_ENC_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS-y)
>  LIBRUBY_ENC_CFLAGS-y += -DRUBY_EXPORT=1 -DONIG_ENC_REGISTER=rb_enc_register
>  
>  ifeq ($(CONFIG_LIBRUBY_ENC),y)
> @@ -551,7 +552,7 @@ LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/utf_16_32.c
>  # Unit testing
>  
> ################################################################################
>  LIBRUBY_TEST_CFLAGS-y += $(LIBRUBY_CINCLUDES-y)
> -LIBRUBY_TEST_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS)
> +LIBRUBY_TEST_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS-y)
>  LIBRUBY_TEST_CFLAGS-y += -DRUBY_EXTCONF_H=\"extconf.h\"
>  
>  $(LIBRUBY_SRC)/ext/-test-/file/init_file.c: 
> $(LIBRUBY_SRC)/ext/-test-/file/init.c
> 

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.