[meta-java,v2] icedtea7-native: host gcc-9, extra CFLAGS needed

Submitted by Robert Berger on May 8, 2020, 6:08 p.m. | Patch ID: 172423

Details

Message ID 20200508180832.8903-1-robert.berger@ReliableEmbeddedSystems.com
State Master Next
Delegated to: Richard Leitner
Headers show

Commit Message

Robert Berger May 8, 2020, 6:08 p.m.
From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>

Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
---
 recipes-core/icedtea/icedtea7-native.inc | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index 8d0dc71..b9ad2bd 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -28,6 +28,11 @@  CXX_append = " -std=gnu++98"
 # WORKAROUND: ignore errors from new compilers
 CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
 
+# oe.utils.get_host_compiler_version returns "gcc, 9.2" and we want -> "9"
+HOST_COMPILER_MAJOR="${@oe.utils.get_host_compiler_version(d)[1].split(".", 2)[0]}"
+# if compiler version 9 detected, add more CFLAGS
+CFLAGS_append = " ${@oe.utils.conditional('HOST_COMPILER_MAJOR', '9', '-Wno-error=format-overflow', '', d)}"
+
 inherit native java autotools pkgconfig
 inherit openjdk-build-helper
 inherit python3native

Comments

Richard Leitner May 9, 2020, 9:13 a.m.
Hi,
thanks for the patch!

I've rebased it on current master and pushed it to master-next for
further testing!

regards;rl

On Fri, May 08, 2020 at 09:08:32PM +0300, Robert Berger wrote:
> From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> 
> Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> ---
>  recipes-core/icedtea/icedtea7-native.inc | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
> index 8d0dc71..b9ad2bd 100644
> --- a/recipes-core/icedtea/icedtea7-native.inc
> +++ b/recipes-core/icedtea/icedtea7-native.inc
> @@ -28,6 +28,11 @@ CXX_append = " -std=gnu++98"
>  # WORKAROUND: ignore errors from new compilers
>  CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
>  
> +# oe.utils.get_host_compiler_version returns "gcc, 9.2" and we want -> "9"
> +HOST_COMPILER_MAJOR="${@oe.utils.get_host_compiler_version(d)[1].split(".", 2)[0]}"
> +# if compiler version 9 detected, add more CFLAGS
> +CFLAGS_append = " ${@oe.utils.conditional('HOST_COMPILER_MAJOR', '9', '-Wno-error=format-overflow', '', d)}"
> +
>  inherit native java autotools pkgconfig
>  inherit openjdk-build-helper
>  inherit python3native
> -- 
> 2.17.1
> 

>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84276): https://lists.openembedded.org/g/openembedded-devel/message/84276
Mute This Topic: https://lists.openembedded.org/mt/74079326/3617530
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-