[oe] [meta-java][PATCH] openjdk-8: Fix compilation error due to format-overflow

Richard Leitner richard.leitner at skidata.com
Fri Dec 27 10:59:15 UTC 2019


Hi Mohamad,
thanks for your patches!

On 06/12/2019 02:33, mohamad.noor.alim.hussin at intel.com wrote:
> From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin at intel.com>
> 
> Getting a compilation error when compiling openjdk-8 due
> to format-overflow. Suppress the error message by ignoring
> warning messages of format-overflow.

Under what conditions are you getting a format-overflow warning?

AFAIK they should be fixed for openjdk-8 in 
recipes-core/openjdk/patches-openjdk-8/hotspot-handle-gcc7-format-overflow.patch

regards;Richard.L

> 
> Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin at intel.com>
> ---
>   recipes-core/openjdk/openjdk-8-common.inc | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
> index 4d8f935..566d7e7 100644
> --- a/recipes-core/openjdk/openjdk-8-common.inc
> +++ b/recipes-core/openjdk/openjdk-8-common.inc
> @@ -177,6 +177,9 @@ FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>   FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>   FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>   
> +# WORKAROUND: ignore errors from new compilers
> +CFLAGS_append = " -Wno-error=format-overflow"
> +
>   # flags for -native, and for bits that need a host-tool during -cross
>   BUILD_CFLAGS_append = " ${@openjdk_build_helper_get_build_cflags(d)}"
>   BUILD_CXXFLAGS_append = " ${@openjdk_build_helper_get_build_cflags(d)}"
> 


More information about the Openembedded-devel mailing list