* [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow
@ 2019-12-05 2:43 mohamad.noor.alim.hussin
2019-12-27 11:00 ` Richard Leitner
0 siblings, 1 reply; 4+ messages in thread
From: mohamad.noor.alim.hussin @ 2019-12-05 2:43 UTC (permalink / raw)
To: openembedded-devel
From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
Getting a compilaton error due to format-overflow. Workaround
to suppress the error message by ignore the warning.
Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
---
recipes-core/icedtea/icedtea7-native.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index b578cb2..0329d71 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -26,7 +26,7 @@ CXXFLAGS_append = " -fno-tree-dse"
CXX_append = " -std=gnu++98"
# WORKAROUND: ignore errors from new compilers
-CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
+CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type -Wno-error=format-overflow"
inherit native java autotools pkgconfig
inherit openjdk-build-helper
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow
2019-12-05 2:43 [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow mohamad.noor.alim.hussin
@ 2019-12-27 11:00 ` Richard Leitner
2019-12-30 8:11 ` Hussin, Mohamad Noor Alim
0 siblings, 1 reply; 4+ messages in thread
From: Richard Leitner @ 2019-12-27 11:00 UTC (permalink / raw)
To: mohamad.noor.alim.hussin, openembedded-devel
Hi,
On 05/12/2019 03:43, mohamad.noor.alim.hussin@intel.com wrote:
> From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
>
> Getting a compilaton error due to format-overflow. Workaround
> to suppress the error message by ignore the warning.
Same as for jdk 8, AFAIK these warnings should be fixed by
recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch
Where/why do you get them?
regards;Richard.L
>
> Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
> ---
> recipes-core/icedtea/icedtea7-native.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
> index b578cb2..0329d71 100644
> --- a/recipes-core/icedtea/icedtea7-native.inc
> +++ b/recipes-core/icedtea/icedtea7-native.inc
> @@ -26,7 +26,7 @@ CXXFLAGS_append = " -fno-tree-dse"
> CXX_append = " -std=gnu++98"
>
> # WORKAROUND: ignore errors from new compilers
> -CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
> +CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type -Wno-error=format-overflow"
>
> inherit native java autotools pkgconfig
> inherit openjdk-build-helper
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow
2019-12-27 11:00 ` Richard Leitner
@ 2019-12-30 8:11 ` Hussin, Mohamad Noor Alim
2019-12-30 9:04 ` Richard Leitner
0 siblings, 1 reply; 4+ messages in thread
From: Hussin, Mohamad Noor Alim @ 2019-12-30 8:11 UTC (permalink / raw)
To: Richard Leitner, openembedded-devel
Hi Richard,
I am using gcc 8.3.0. I get this error while compiling the source code hotspot/src/share/vm/adlc/output_c.cpp which related to sprintf.
See the error log below.
/workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34: error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and 12 [-Werror=format-overflow=]
sprintf(left_reg_index,",inst%d_idx%d", left_index, left_op_index);
^~~~~~~~~~~~~~~
/workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34: note: directive argument in the range [-2147483648, 9999]
In file included from /usr/include/stdio.h:873,
from /workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/adlc.hpp:33,
from /workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:27:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 12 and 32 bytes into a destination of size 18
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1252:37: error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and 12 [-Werror=format-overflow=]
sprintf(right_reg_index,",inst%d_idx%d", right_index, right_op_index);
^~~~~~~~~~~~~~~
By the way, this patch file "recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch" is set to apply=no
in recipe file https://git.yoctoproject.org/cgit/cgit.cgi/meta-java/tree/recipes-core/icedtea/openjdk-7-release-03b147.inc#n92.
So, that patch file will not apply during do_patch.
Regards,
Alim Hussin
-----Original Message-----
From: Richard Leitner <richard.leitner@skidata.com>
Sent: Friday, December 27, 2019 7:00 PM
To: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com>; openembedded-devel@lists.openembedded.org
Subject: Re: [oe] [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow
Hi,
On 05/12/2019 03:43, mohamad.noor.alim.hussin@intel.com wrote:
> From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
>
> Getting a compilaton error due to format-overflow. Workaround to
> suppress the error message by ignore the warning.
Same as for jdk 8, AFAIK these warnings should be fixed by recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch
Where/why do you get them?
regards;Richard.L
>
> Signed-off-by: Mohamad Noor Alim Hussin
> <mohamad.noor.alim.hussin@intel.com>
> ---
> recipes-core/icedtea/icedtea7-native.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/recipes-core/icedtea/icedtea7-native.inc
> b/recipes-core/icedtea/icedtea7-native.inc
> index b578cb2..0329d71 100644
> --- a/recipes-core/icedtea/icedtea7-native.inc
> +++ b/recipes-core/icedtea/icedtea7-native.inc
> @@ -26,7 +26,7 @@ CXXFLAGS_append = " -fno-tree-dse"
> CXX_append = " -std=gnu++98"
>
> # WORKAROUND: ignore errors from new compilers -CFLAGS_append = "
> -Wno-error=stringop-overflow -Wno-error=return-type"
> +CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type -Wno-error=format-overflow"
>
> inherit native java autotools pkgconfig
> inherit openjdk-build-helper
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow
2019-12-30 8:11 ` Hussin, Mohamad Noor Alim
@ 2019-12-30 9:04 ` Richard Leitner
0 siblings, 0 replies; 4+ messages in thread
From: Richard Leitner @ 2019-12-30 9:04 UTC (permalink / raw)
To: Hussin, Mohamad Noor Alim, openembedded-devel
Hi,
On 30/12/2019 09:11, Hussin, Mohamad Noor Alim wrote:
> Hi Richard,
>
> I am using gcc 8.3.0. I get this error while compiling the source code hotspot/src/share/vm/adlc/output_c.cpp which related to sprintf.
> See the error log below.
>
> /workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34: error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and 12 [-Werror=format-overflow=]
> sprintf(left_reg_index,",inst%d_idx%d", left_index, left_op_index);
> ^~~~~~~~~~~~~~~
> /workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34: note: directive argument in the range [-2147483648, 9999]
> In file included from /usr/include/stdio.h:873,
> from /workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/adlc.hpp:33,
> from /workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:27:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 12 and 32 bytes into a destination of size 18
> return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
> ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> __bos (__s), __fmt, __va_arg_pack ());
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /workspace/poky/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1252:37: error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and 12 [-Werror=format-overflow=]
> sprintf(right_reg_index,",inst%d_idx%d", right_index, right_op_index);
> ^~~~~~~~~~~~~~~
Strange, I'm unable to reproduce that problem...
Nonetheless I'd prefer a "real" fix of the error instead of Wno-error if
that's doable for you?
>
> By the way, this patch file "recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch" is set to apply=no
> in recipe file https://git.yoctoproject.org/cgit/cgit.cgi/meta-java/tree/recipes-core/icedtea/openjdk-7-release-03b147.inc#n92.
> So, that patch file will not apply during do_patch.
It is applied using DISTRIBUTION_PATCHES in
https://git.yoctoproject.org/cgit/cgit.cgi/meta-java/tree/recipes-core/icedtea/openjdk-7-release-03b147.inc#n115
regards;rl
>
> Regards,
> Alim Hussin
>
> -----Original Message-----
> From: Richard Leitner <richard.leitner@skidata.com>
> Sent: Friday, December 27, 2019 7:00 PM
> To: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hussin@intel.com>; openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow
>
> Hi,
>
> On 05/12/2019 03:43, mohamad.noor.alim.hussin@intel.com wrote:
>> From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
>>
>> Getting a compilaton error due to format-overflow. Workaround to
>> suppress the error message by ignore the warning.
>
> Same as for jdk 8, AFAIK these warnings should be fixed by recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch
>
> Where/why do you get them?
>
> regards;Richard.L
>
>>
>> Signed-off-by: Mohamad Noor Alim Hussin
>> <mohamad.noor.alim.hussin@intel.com>
>> ---
>> recipes-core/icedtea/icedtea7-native.inc | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/recipes-core/icedtea/icedtea7-native.inc
>> b/recipes-core/icedtea/icedtea7-native.inc
>> index b578cb2..0329d71 100644
>> --- a/recipes-core/icedtea/icedtea7-native.inc
>> +++ b/recipes-core/icedtea/icedtea7-native.inc
>> @@ -26,7 +26,7 @@ CXXFLAGS_append = " -fno-tree-dse"
>> CXX_append = " -std=gnu++98"
>>
>> # WORKAROUND: ignore errors from new compilers -CFLAGS_append = "
>> -Wno-error=stringop-overflow -Wno-error=return-type"
>> +CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type -Wno-error=format-overflow"
>>
>> inherit native java autotools pkgconfig
>> inherit openjdk-build-helper
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-30 9:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 2:43 [meta-java][PATCH] icedtea7-native: Fix compilation error due to format-overflow mohamad.noor.alim.hussin
2019-12-27 11:00 ` Richard Leitner
2019-12-30 8:11 ` Hussin, Mohamad Noor Alim
2019-12-30 9:04 ` Richard Leitner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.