All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
@ 2017-04-26 13:39 Richard Leitner
  2017-04-28  8:19 ` Maxin B. John
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Leitner @ 2017-04-26 13:39 UTC (permalink / raw)
  To: openembedded-devel; +Cc: dev

Using the current poky master openjdk-7 wasn't buildable. This patch
fixes those problems by adding three more patches to openjdk-7.

These patches basically add/fix GCC6 support. Furthermore the
LDFLAGS_HASH_STYLE variable (which was removed by the
icedtea-crosscompile-fix.patch) is re-introduced and set to "both" for
compatibility reasons.

Following two patches were originally written by Abdur Rehman and taken
from meta-mentor [1]:
	icedtea-flags-to-compile-with-GCC-6.patch
	icedtea-specify-overloaded-variant-of-fmod.patch

[1] https://github.com/MentorEmbedded/meta-mentor

Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
---
 recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb      | 12 +++-
 .../icedtea-crosscompile-fix.patch                 |  3 +-
 .../icedtea-flags-to-compile-with-GCC-6.patch      | 74 ++++++++++++++++++++++
 ...icedtea-hotspot-fix-string-literal-marcos.patch | 26 ++++++++
 ...cedtea-specify-overloaded-variant-of-fmod.patch | 28 ++++++++
 5 files changed, 141 insertions(+), 2 deletions(-)
 create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
 create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
 create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch

diff --git a/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb b/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
index eba353e..aa165f5 100644
--- a/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
+++ b/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
@@ -51,6 +51,9 @@ ICEDTEAPATCHES = "\
     file://icedtea-xawt-crosscompile-fix.patch;apply=no \
     file://icedtea-jdk-unzip.patch;apply=no \
     file://icedtea-dtrace-std_h.patch;apply=no \
+    file://icedtea-hotspot-fix-string-literal-marcos.patch;apply=no \
+    file://icedtea-flags-to-compile-with-GCC-6.patch;apply=no \
+    file://icedtea-specify-overloaded-variant-of-fmod.patch;apply=no \
 "
 
 DISTRIBUTION_PATCHES = "\
@@ -61,10 +64,17 @@ DISTRIBUTION_PATCHES = "\
     patches/icedtea-xawt-crosscompile-fix.patch \
     patches/icedtea-jdk-unzip.patch \
     patches/icedtea-dtrace-std_h.patch \
+    patches/icedtea-hotspot-fix-string-literal-marcos.patch \
+    patches/icedtea-flags-to-compile-with-GCC-6.patch \
+    patches/icedtea-specify-overloaded-variant-of-fmod.patch \
 "
 
 export DISTRIBUTION_PATCHES
 
 # readdir_r was deprecated in glibc-2.24. Ignore the error for now
+#
+# Furthermore shifting negative values produces an error in current gcc versions
+# to avoid this error add -fpermissive
+#
 # NOTE: When updating the recipe, please check if this is still needed
-CFLAGS_append = " -Wno-error=deprecated-declarations"
+CFLAGS_append = " -Wno-error=deprecated-declarations -Wno-error=narrowing -fpermissive"
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
index e957d1e..5d93dbd 100644
--- a/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
@@ -53,7 +53,7 @@ index 6fe5191..765fc6d 100644
  
  # Hotspot uses very unstrict aliasing turn this optimization off
  OPT_CFLAGS += -fno-strict-aliasing
-@@ -208,15 +208,7 @@ LFLAGS += -Wl,-relax
+@@ -208,15 +208,8 @@ LFLAGS += -Wl,-relax
  endif
  
  # Enable linker optimization
@@ -66,6 +66,7 @@ index 6fe5191..765fc6d 100644
 -  LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
 -endif
 -LFLAGS += $(LDFLAGS_HASH_STYLE)
++LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
 +LFLAGS += $(OE_LDFLAGS)
  
  # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
new file mode 100644
index 0000000..062c6bf
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
@@ -0,0 +1,74 @@
+From 732aab80cb1505ef2f4d8a6e141f835aa9f6d985 Mon Sep 17 00:00:00 2001
+From: Abdur Rehman <abdur_rehman@mentor.com>
+Date: Mon, 24 Oct 2016 20:24:32 +0500
+Subject: [PATCH] icedtea flags to compile with GCC 6
+
+Upstream bug filed here:
+https://bugs.openjdk.java.net/browse/JDK-8163032
+
+This patch combines the changes introduced by following commits:
+* http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/e34324d73cd5
+* http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/9e1264f51bae
+
+Upstream-Status: Backport
+
+Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
+---
+ openjdk/hotspot/make/linux/makefiles/gcc.make | 7 +++++++
+ openjdk/jdk/make/common/Defs-linux.gmk        | 8 +++++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+index 4ef0e49..bca3c5c 100644
+--- openjdk/hotspot/make/linux/makefiles/gcc.make
++++ openjdk/hotspot/make/linux/makefiles/gcc.make
+@@ -83,6 +83,7 @@ ifeq ($(TYPE),SHARK)
+ CFLAGS += $(LIBFFI_CFLAGS)
+ CFLAGS += $(LLVM_CFLAGS)
+ endif
++CFLAGS += -std=gnu++98
+ CFLAGS += $(VM_PICFLAG)
+ CFLAGS += -fno-rtti
+ CFLAGS += -fno-exceptions
+@@ -93,6 +94,12 @@ CFLAGS += -fcheck-new
+ ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+ CFLAGS += -fvisibility=hidden
+ endif
++# GCC 6 has more aggressive dead-store elimination which causes the VM to crash
++# It also optimises away null pointer checks which are still needed.
++# We turn both of these optimisations off.
++ifneq "$(shell expr \( $(CC_VER_MAJOR) \>= 6 \))" "0"
++CFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
++endif
+ 
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+ ARCHFLAG/i486    = -m32 -march=i586
+diff --git openjdk/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk
+index f64042c..727593c 100644
+--- openjdk/jdk/make/common/Defs-linux.gmk
++++ openjdk/jdk/make/common/Defs-linux.gmk
+@@ -217,6 +217,12 @@ CFLAGS_REQUIRED_ppc64   += -fno-tree-vectorize
+   CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
+   LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
+ endif
++# GCC 6 has more aggressive dead-store elimination which causes the VM to crash
++# It also optimises away null pointer checks which are still needed.
++# We turn both of these optimisations off.
++ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 6 ),1)
++ CFLAGS_REQUIRED += -fno-delete-null-pointer-checks -fno-lifetime-dse
++endif
+ 
+ # If this is a --hash-style=gnu system, use --hash-style=both
+ #   The gnu .hash section won't work on some Linux systems like SuSE 10.
+@@ -281,7 +287,7 @@ CFLAGS_OPT      = $(CC_OPT)
+ CFLAGS_DBG      = $(DEBUG_FLAG)
+ CFLAGS_COMMON += $(CFLAGS_REQUIRED)
+ 
+-CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
++CXXFLAGS_COMMON = -std=gnu++98 $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
+ CXXFLAGS_OPT	= $(CC_OPT)
+ CXXFLAGS_DBG	= $(DEBUG_FLAG)
+ CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
+-- 
+2.8.1
+
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
new file mode 100644
index 0000000..533a04a
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
@@ -0,0 +1,26 @@
+--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+@@ -4378,9 +4378,9 @@
+ #define G1PPRL_DOUBLE_H_FORMAT        "  %14s"
+ 
+ // For summary info
+-#define G1PPRL_SUM_ADDR_FORMAT(tag)    "  "tag":"G1PPRL_ADDR_BASE_FORMAT
+-#define G1PPRL_SUM_BYTE_FORMAT(tag)    "  "tag": "SIZE_FORMAT
+-#define G1PPRL_SUM_MB_FORMAT(tag)      "  "tag": %1.2f MB"
++#define G1PPRL_SUM_ADDR_FORMAT(tag)    "  " tag ":"G1PPRL_ADDR_BASE_FORMAT
++#define G1PPRL_SUM_BYTE_FORMAT(tag)    "  " tag ": "SIZE_FORMAT
++#define G1PPRL_SUM_MB_FORMAT(tag)      "  " tag ": %1.2f MB"
+ #define G1PPRL_SUM_MB_PERC_FORMAT(tag) G1PPRL_SUM_MB_FORMAT(tag)" / %1.2f %%"
+ 
+ G1PrintRegionLivenessInfoClosure::
+--- openjdk/hotspot/src/share/vm/prims/unsafe.cpp
++++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp
+@@ -950,7 +950,7 @@
+   }
+ UNSAFE_END
+ 
+-#define DAC_Args CLS"[B["OBJ
++#define DAC_Args CLS "[B[" OBJ
+ // define a class but do not make it known to the class loader or system dictionary
+ // - host_class:  supplies context for linkage, access control, protection domain, and class loader
+ // - data:  bytes of a class file, a raw memory address (length gives the number of bytes)
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch
new file mode 100644
index 0000000..09fbffe
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch
@@ -0,0 +1,28 @@
+From 64a8800cd4efa15bf625227b7cd3a2e15ebfa359 Mon Sep 17 00:00:00 2001
+From: Abdur Rehman <abdur_rehman@mentor.com>
+Date: Tue, 25 Oct 2016 13:29:51 +0500
+Subject: [PATCH] arm32JIT.cpp: specify overloaded variant of fmod
+
+Upstream-Status: Pending
+
+Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
+---
+ openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
+index 089a1c9..4482fd6 100644
+--- openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
++++ openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
+@@ -8185,7 +8185,7 @@ handlers[H_INVOKEINTERFACE] = (unsigned)(cb->hp + INVOKEINTERFACE_STUB);
+ 
+   handlers[H_DREM] = out_pos(&codebuf);
+   stm(&codebuf, (1<<ARM_LR), ARM_SP, PUSH_FD, 1);
+-  mov_imm(&codebuf, ARM_IP, (u32)fmod);
++  mov_imm(&codebuf, ARM_IP, (u32)(double (*)(double, double))fmod);
+ #ifdef __ARM_PCS_VFP
+   vmov_reg_d_toVFP(&codebuf, VFP_D0, ARM_R0, ARM_R1);
+   vmov_reg_d_toVFP(&codebuf, VFP_D1, ARM_R2, ARM_R3);
+-- 
+2.8.1
+
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
  2017-04-26 13:39 [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6) Richard Leitner
@ 2017-04-28  8:19 ` Maxin B. John
  0 siblings, 0 replies; 8+ messages in thread
From: Maxin B. John @ 2017-04-28  8:19 UTC (permalink / raw)
  To: Richard Leitner; +Cc: openembedded-devel, dev

Hi,

On Wed, Apr 26, 2017 at 03:39:12PM +0200, Richard Leitner wrote:
> Using the current poky master openjdk-7 wasn't buildable. This patch
> fixes those problems by adding three more patches to openjdk-7.
> 
> These patches basically add/fix GCC6 support. Furthermore the
> LDFLAGS_HASH_STYLE variable (which was removed by the
> icedtea-crosscompile-fix.patch) is re-introduced and set to "both" for
> compatibility reasons.
> 
> Following two patches were originally written by Abdur Rehman and taken
> from meta-mentor [1]:
> 	icedtea-flags-to-compile-with-GCC-6.patch
> 	icedtea-specify-overloaded-variant-of-fmod.patch
> 
> [1] https://github.com/MentorEmbedded/meta-mentor
> 
> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
> ---

Pushed to master-next. Thanks !

Warm Regards,
Maxin

>  recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb      | 12 +++-
>  .../icedtea-crosscompile-fix.patch                 |  3 +-
>  .../icedtea-flags-to-compile-with-GCC-6.patch      | 74 ++++++++++++++++++++++
>  ...icedtea-hotspot-fix-string-literal-marcos.patch | 26 ++++++++
>  ...cedtea-specify-overloaded-variant-of-fmod.patch | 28 ++++++++
>  5 files changed, 141 insertions(+), 2 deletions(-)
>  create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
>  create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
>  create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch
> 
> diff --git a/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb b/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
> index eba353e..aa165f5 100644
> --- a/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
> +++ b/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
> @@ -51,6 +51,9 @@ ICEDTEAPATCHES = "\
>      file://icedtea-xawt-crosscompile-fix.patch;apply=no \
>      file://icedtea-jdk-unzip.patch;apply=no \
>      file://icedtea-dtrace-std_h.patch;apply=no \
> +    file://icedtea-hotspot-fix-string-literal-marcos.patch;apply=no \
> +    file://icedtea-flags-to-compile-with-GCC-6.patch;apply=no \
> +    file://icedtea-specify-overloaded-variant-of-fmod.patch;apply=no \
>  "
>  
>  DISTRIBUTION_PATCHES = "\
> @@ -61,10 +64,17 @@ DISTRIBUTION_PATCHES = "\
>      patches/icedtea-xawt-crosscompile-fix.patch \
>      patches/icedtea-jdk-unzip.patch \
>      patches/icedtea-dtrace-std_h.patch \
> +    patches/icedtea-hotspot-fix-string-literal-marcos.patch \
> +    patches/icedtea-flags-to-compile-with-GCC-6.patch \
> +    patches/icedtea-specify-overloaded-variant-of-fmod.patch \
>  "
>  
>  export DISTRIBUTION_PATCHES
>  
>  # readdir_r was deprecated in glibc-2.24. Ignore the error for now
> +#
> +# Furthermore shifting negative values produces an error in current gcc versions
> +# to avoid this error add -fpermissive
> +#
>  # NOTE: When updating the recipe, please check if this is still needed
> -CFLAGS_append = " -Wno-error=deprecated-declarations"
> +CFLAGS_append = " -Wno-error=deprecated-declarations -Wno-error=narrowing -fpermissive"
> diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
> index e957d1e..5d93dbd 100644
> --- a/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
> +++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
> @@ -53,7 +53,7 @@ index 6fe5191..765fc6d 100644
>   
>   # Hotspot uses very unstrict aliasing turn this optimization off
>   OPT_CFLAGS += -fno-strict-aliasing
> -@@ -208,15 +208,7 @@ LFLAGS += -Wl,-relax
> +@@ -208,15 +208,8 @@ LFLAGS += -Wl,-relax
>   endif
>   
>   # Enable linker optimization
> @@ -66,6 +66,7 @@ index 6fe5191..765fc6d 100644
>  -  LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
>  -endif
>  -LFLAGS += $(LDFLAGS_HASH_STYLE)
> ++LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
>  +LFLAGS += $(OE_LDFLAGS)
>   
>   # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
> diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
> new file mode 100644
> index 0000000..062c6bf
> --- /dev/null
> +++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
> @@ -0,0 +1,74 @@
> +From 732aab80cb1505ef2f4d8a6e141f835aa9f6d985 Mon Sep 17 00:00:00 2001
> +From: Abdur Rehman <abdur_rehman@mentor.com>
> +Date: Mon, 24 Oct 2016 20:24:32 +0500
> +Subject: [PATCH] icedtea flags to compile with GCC 6
> +
> +Upstream bug filed here:
> +https://bugs.openjdk.java.net/browse/JDK-8163032
> +
> +This patch combines the changes introduced by following commits:
> +* http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/e34324d73cd5
> +* http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/9e1264f51bae
> +
> +Upstream-Status: Backport
> +
> +Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
> +---
> + openjdk/hotspot/make/linux/makefiles/gcc.make | 7 +++++++
> + openjdk/jdk/make/common/Defs-linux.gmk        | 8 +++++++-
> + 2 files changed, 14 insertions(+), 1 deletion(-)
> +
> +diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
> +index 4ef0e49..bca3c5c 100644
> +--- openjdk/hotspot/make/linux/makefiles/gcc.make
> ++++ openjdk/hotspot/make/linux/makefiles/gcc.make
> +@@ -83,6 +83,7 @@ ifeq ($(TYPE),SHARK)
> + CFLAGS += $(LIBFFI_CFLAGS)
> + CFLAGS += $(LLVM_CFLAGS)
> + endif
> ++CFLAGS += -std=gnu++98
> + CFLAGS += $(VM_PICFLAG)
> + CFLAGS += -fno-rtti
> + CFLAGS += -fno-exceptions
> +@@ -93,6 +94,12 @@ CFLAGS += -fcheck-new
> + ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
> + CFLAGS += -fvisibility=hidden
> + endif
> ++# GCC 6 has more aggressive dead-store elimination which causes the VM to crash
> ++# It also optimises away null pointer checks which are still needed.
> ++# We turn both of these optimisations off.
> ++ifneq "$(shell expr \( $(CC_VER_MAJOR) \>= 6 \))" "0"
> ++CFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
> ++endif
> + 
> + ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
> + ARCHFLAG/i486    = -m32 -march=i586
> +diff --git openjdk/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk
> +index f64042c..727593c 100644
> +--- openjdk/jdk/make/common/Defs-linux.gmk
> ++++ openjdk/jdk/make/common/Defs-linux.gmk
> +@@ -217,6 +217,12 @@ CFLAGS_REQUIRED_ppc64   += -fno-tree-vectorize
> +   CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
> +   LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
> + endif
> ++# GCC 6 has more aggressive dead-store elimination which causes the VM to crash
> ++# It also optimises away null pointer checks which are still needed.
> ++# We turn both of these optimisations off.
> ++ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 6 ),1)
> ++ CFLAGS_REQUIRED += -fno-delete-null-pointer-checks -fno-lifetime-dse
> ++endif
> + 
> + # If this is a --hash-style=gnu system, use --hash-style=both
> + #   The gnu .hash section won't work on some Linux systems like SuSE 10.
> +@@ -281,7 +287,7 @@ CFLAGS_OPT      = $(CC_OPT)
> + CFLAGS_DBG      = $(DEBUG_FLAG)
> + CFLAGS_COMMON += $(CFLAGS_REQUIRED)
> + 
> +-CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
> ++CXXFLAGS_COMMON = -std=gnu++98 $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
> + CXXFLAGS_OPT	= $(CC_OPT)
> + CXXFLAGS_DBG	= $(DEBUG_FLAG)
> + CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
> +-- 
> +2.8.1
> +
> diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
> new file mode 100644
> index 0000000..533a04a
> --- /dev/null
> +++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
> @@ -0,0 +1,26 @@
> +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
> ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
> +@@ -4378,9 +4378,9 @@
> + #define G1PPRL_DOUBLE_H_FORMAT        "  %14s"
> + 
> + // For summary info
> +-#define G1PPRL_SUM_ADDR_FORMAT(tag)    "  "tag":"G1PPRL_ADDR_BASE_FORMAT
> +-#define G1PPRL_SUM_BYTE_FORMAT(tag)    "  "tag": "SIZE_FORMAT
> +-#define G1PPRL_SUM_MB_FORMAT(tag)      "  "tag": %1.2f MB"
> ++#define G1PPRL_SUM_ADDR_FORMAT(tag)    "  " tag ":"G1PPRL_ADDR_BASE_FORMAT
> ++#define G1PPRL_SUM_BYTE_FORMAT(tag)    "  " tag ": "SIZE_FORMAT
> ++#define G1PPRL_SUM_MB_FORMAT(tag)      "  " tag ": %1.2f MB"
> + #define G1PPRL_SUM_MB_PERC_FORMAT(tag) G1PPRL_SUM_MB_FORMAT(tag)" / %1.2f %%"
> + 
> + G1PrintRegionLivenessInfoClosure::
> +--- openjdk/hotspot/src/share/vm/prims/unsafe.cpp
> ++++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp
> +@@ -950,7 +950,7 @@
> +   }
> + UNSAFE_END
> + 
> +-#define DAC_Args CLS"[B["OBJ
> ++#define DAC_Args CLS "[B[" OBJ
> + // define a class but do not make it known to the class loader or system dictionary
> + // - host_class:  supplies context for linkage, access control, protection domain, and class loader
> + // - data:  bytes of a class file, a raw memory address (length gives the number of bytes)
> diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch
> new file mode 100644
> index 0000000..09fbffe
> --- /dev/null
> +++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch
> @@ -0,0 +1,28 @@
> +From 64a8800cd4efa15bf625227b7cd3a2e15ebfa359 Mon Sep 17 00:00:00 2001
> +From: Abdur Rehman <abdur_rehman@mentor.com>
> +Date: Tue, 25 Oct 2016 13:29:51 +0500
> +Subject: [PATCH] arm32JIT.cpp: specify overloaded variant of fmod
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
> +---
> + openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
> +index 089a1c9..4482fd6 100644
> +--- openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
> ++++ openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
> +@@ -8185,7 +8185,7 @@ handlers[H_INVOKEINTERFACE] = (unsigned)(cb->hp + INVOKEINTERFACE_STUB);
> + 
> +   handlers[H_DREM] = out_pos(&codebuf);
> +   stm(&codebuf, (1<<ARM_LR), ARM_SP, PUSH_FD, 1);
> +-  mov_imm(&codebuf, ARM_IP, (u32)fmod);
> ++  mov_imm(&codebuf, ARM_IP, (u32)(double (*)(double, double))fmod);
> + #ifdef __ARM_PCS_VFP
> +   vmov_reg_d_toVFP(&codebuf, VFP_D0, ARM_R0, ARM_R1);
> +   vmov_reg_d_toVFP(&codebuf, VFP_D1, ARM_R2, ARM_R3);
> +-- 
> +2.8.1
> +
> -- 
> 2.1.4
> 
> -- 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
  2018-01-08 12:22       ` Diaz de Grenu, Jose
@ 2018-01-08 13:01         ` Maxin B. John
  0 siblings, 0 replies; 8+ messages in thread
From: Maxin B. John @ 2018-01-08 13:01 UTC (permalink / raw)
  To: Diaz de Grenu, Jose; +Cc: openembedded-devel

Hi,

On Mon, Jan 08, 2018 at 12:22:11PM +0000, Diaz de Grenu, Jose wrote:
> -----Original Message-----
> From: Mittal, Anuj [mailto:anuj.mittal@intel.com] 
> 
> > You can prefix your subject with branch name like [morty][PATCH] ...
> 
> Thanks!
> 
> Should I resend it?

No need to resend it. Pushed to morty branch now.

Thanks!

Best Regards,
Maxin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
  2018-01-08 12:16     ` Mittal, Anuj
@ 2018-01-08 12:22       ` Diaz de Grenu, Jose
  2018-01-08 13:01         ` Maxin B. John
  0 siblings, 1 reply; 8+ messages in thread
From: Diaz de Grenu, Jose @ 2018-01-08 12:22 UTC (permalink / raw)
  To: Mittal, Anuj, Richard Leitner, openembedded-devel

-----Original Message-----
From: Mittal, Anuj [mailto:anuj.mittal@intel.com] 

> You can prefix your subject with branch name like [morty][PATCH] ...

Thanks!

Should I resend it?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
  2018-01-08 12:05   ` Diaz de Grenu, Jose
@ 2018-01-08 12:16     ` Mittal, Anuj
  2018-01-08 12:22       ` Diaz de Grenu, Jose
  0 siblings, 1 reply; 8+ messages in thread
From: Mittal, Anuj @ 2018-01-08 12:16 UTC (permalink / raw)
  To: Diaz de Grenu, Jose, Richard Leitner, openembedded-devel

> -----Original Message-----
> From: openembedded-devel-bounces@lists.openembedded.org
> [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of Diaz
> de Grenu, Jose
> Sent: Monday, January 8, 2018 8:05 PM
> To: Richard Leitner <richard.leitner@skidata.com>; openembedded-
> devel@lists.openembedded.org
> Subject: Re: [oe] [meta-java][PATCH] openjdk-7: fix compile errors with current poky
> master (gcc6)
> 
> Sorry, I meant to ask to merge this into the 'morty' branch.
> 
> I am not used to using mailing lists to send patches. Could you tell me how to indicate
> the destination branch when sending a patch?

You can prefix your subject with branch name like [morty][PATCH] ...

> 
> Thank you
> 
> -----Original Message-----
> From: Richard Leitner [mailto:richard.leitner@skidata.com]
> Sent: Monday, January 8, 2018 12:58 PM
> To: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>; openembedded-
> devel@lists.openembedded.org
> Subject: Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky
> master (gcc6)
> 
> Hi Jose,
> 
> On 01/08/2018 12:49 PM, Jose Diaz de Grenu wrote:
> > From: Richard Leitner <richard.leitner@skidata.com>
> >
> > Using the current poky master openjdk-7 wasn't buildable. This patch
> > fixes those problems by adding three more patches to openjdk-7.
> >
> > These patches basically add/fix GCC6 support. Furthermore the
> > LDFLAGS_HASH_STYLE variable (which was removed by the
> > icedtea-crosscompile-fix.patch) is re-introduced and set to "both" for
> > compatibility reasons.
> >
> > Following two patches were originally written by Abdur Rehman and
> > taken from meta-mentor [1]:
> > 	icedtea-flags-to-compile-with-GCC-6.patch
> > 	icedtea-specify-overloaded-variant-of-fmod.patch
> >
> > [1] https://github.com/MentorEmbedded/meta-mentor
> >
> > Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
> > Signed-off-by: Maxin B. John <maxin.john@intel.com>
> > Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
> 
> AFAIK this patch was already merged to meta-java/master...
> So why the resend?
> 
> regards;Richard.L
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
  2018-01-08 11:57 ` Richard Leitner
@ 2018-01-08 12:05   ` Diaz de Grenu, Jose
  2018-01-08 12:16     ` Mittal, Anuj
  0 siblings, 1 reply; 8+ messages in thread
From: Diaz de Grenu, Jose @ 2018-01-08 12:05 UTC (permalink / raw)
  To: Richard Leitner, openembedded-devel

Sorry, I meant to ask to merge this into the 'morty' branch.

I am not used to using mailing lists to send patches. Could you tell me how to indicate the destination branch when sending a patch?

Thank you

-----Original Message-----
From: Richard Leitner [mailto:richard.leitner@skidata.com] 
Sent: Monday, January 8, 2018 12:58 PM
To: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>; openembedded-devel@lists.openembedded.org
Subject: Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)

Hi Jose,

On 01/08/2018 12:49 PM, Jose Diaz de Grenu wrote:
> From: Richard Leitner <richard.leitner@skidata.com>
> 
> Using the current poky master openjdk-7 wasn't buildable. This patch 
> fixes those problems by adding three more patches to openjdk-7.
> 
> These patches basically add/fix GCC6 support. Furthermore the 
> LDFLAGS_HASH_STYLE variable (which was removed by the
> icedtea-crosscompile-fix.patch) is re-introduced and set to "both" for 
> compatibility reasons.
> 
> Following two patches were originally written by Abdur Rehman and 
> taken from meta-mentor [1]:
> 	icedtea-flags-to-compile-with-GCC-6.patch
> 	icedtea-specify-overloaded-variant-of-fmod.patch
> 
> [1] https://github.com/MentorEmbedded/meta-mentor
> 
> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
> Signed-off-by: Maxin B. John <maxin.john@intel.com>
> Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>

AFAIK this patch was already merged to meta-java/master...
So why the resend?

regards;Richard.L

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
  2018-01-08 11:49 Jose Diaz de Grenu
@ 2018-01-08 11:57 ` Richard Leitner
  2018-01-08 12:05   ` Diaz de Grenu, Jose
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Leitner @ 2018-01-08 11:57 UTC (permalink / raw)
  To: Jose Diaz de Grenu, openembedded-devel

Hi Jose,

On 01/08/2018 12:49 PM, Jose Diaz de Grenu wrote:
> From: Richard Leitner <richard.leitner@skidata.com>
> 
> Using the current poky master openjdk-7 wasn't buildable. This patch
> fixes those problems by adding three more patches to openjdk-7.
> 
> These patches basically add/fix GCC6 support. Furthermore the
> LDFLAGS_HASH_STYLE variable (which was removed by the
> icedtea-crosscompile-fix.patch) is re-introduced and set to "both" for
> compatibility reasons.
> 
> Following two patches were originally written by Abdur Rehman and taken
> from meta-mentor [1]:
> 	icedtea-flags-to-compile-with-GCC-6.patch
> 	icedtea-specify-overloaded-variant-of-fmod.patch
> 
> [1] https://github.com/MentorEmbedded/meta-mentor
> 
> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
> Signed-off-by: Maxin B. John <maxin.john@intel.com>
> Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>

AFAIK this patch was already merged to meta-java/master...
So why the resend?

regards;Richard.L


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6)
@ 2018-01-08 11:49 Jose Diaz de Grenu
  2018-01-08 11:57 ` Richard Leitner
  0 siblings, 1 reply; 8+ messages in thread
From: Jose Diaz de Grenu @ 2018-01-08 11:49 UTC (permalink / raw)
  To: openembedded-devel

From: Richard Leitner <richard.leitner@skidata.com>

Using the current poky master openjdk-7 wasn't buildable. This patch
fixes those problems by adding three more patches to openjdk-7.

These patches basically add/fix GCC6 support. Furthermore the
LDFLAGS_HASH_STYLE variable (which was removed by the
icedtea-crosscompile-fix.patch) is re-introduced and set to "both" for
compatibility reasons.

Following two patches were originally written by Abdur Rehman and taken
from meta-mentor [1]:
	icedtea-flags-to-compile-with-GCC-6.patch
	icedtea-specify-overloaded-variant-of-fmod.patch

[1] https://github.com/MentorEmbedded/meta-mentor

Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
---
 recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb      | 12 +++-
 .../icedtea-crosscompile-fix.patch                 |  3 +-
 .../icedtea-flags-to-compile-with-GCC-6.patch      | 74 ++++++++++++++++++++++
 ...icedtea-hotspot-fix-string-literal-marcos.patch | 26 ++++++++
 ...cedtea-specify-overloaded-variant-of-fmod.patch | 28 ++++++++
 5 files changed, 141 insertions(+), 2 deletions(-)
 create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
 create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
 create mode 100644 recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch

diff --git a/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb b/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
index eba353ec4a8c..aa165f5075a3 100644
--- a/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
+++ b/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
@@ -51,6 +51,9 @@ ICEDTEAPATCHES = "\
     file://icedtea-xawt-crosscompile-fix.patch;apply=no \
     file://icedtea-jdk-unzip.patch;apply=no \
     file://icedtea-dtrace-std_h.patch;apply=no \
+    file://icedtea-hotspot-fix-string-literal-marcos.patch;apply=no \
+    file://icedtea-flags-to-compile-with-GCC-6.patch;apply=no \
+    file://icedtea-specify-overloaded-variant-of-fmod.patch;apply=no \
 "
 
 DISTRIBUTION_PATCHES = "\
@@ -61,10 +64,17 @@ DISTRIBUTION_PATCHES = "\
     patches/icedtea-xawt-crosscompile-fix.patch \
     patches/icedtea-jdk-unzip.patch \
     patches/icedtea-dtrace-std_h.patch \
+    patches/icedtea-hotspot-fix-string-literal-marcos.patch \
+    patches/icedtea-flags-to-compile-with-GCC-6.patch \
+    patches/icedtea-specify-overloaded-variant-of-fmod.patch \
 "
 
 export DISTRIBUTION_PATCHES
 
 # readdir_r was deprecated in glibc-2.24. Ignore the error for now
+#
+# Furthermore shifting negative values produces an error in current gcc versions
+# to avoid this error add -fpermissive
+#
 # NOTE: When updating the recipe, please check if this is still needed
-CFLAGS_append = " -Wno-error=deprecated-declarations"
+CFLAGS_append = " -Wno-error=deprecated-declarations -Wno-error=narrowing -fpermissive"
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
index e957d1e2963b..5d93dbdb0ae5 100644
--- a/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-crosscompile-fix.patch
@@ -53,7 +53,7 @@ index 6fe5191..765fc6d 100644
  
  # Hotspot uses very unstrict aliasing turn this optimization off
  OPT_CFLAGS += -fno-strict-aliasing
-@@ -208,15 +208,7 @@ LFLAGS += -Wl,-relax
+@@ -208,15 +208,8 @@ LFLAGS += -Wl,-relax
  endif
  
  # Enable linker optimization
@@ -66,6 +66,7 @@ index 6fe5191..765fc6d 100644
 -  LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
 -endif
 -LFLAGS += $(LDFLAGS_HASH_STYLE)
++LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
 +LFLAGS += $(OE_LDFLAGS)
  
  # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
new file mode 100644
index 000000000000..062c6bfa96c1
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-flags-to-compile-with-GCC-6.patch
@@ -0,0 +1,74 @@
+From 732aab80cb1505ef2f4d8a6e141f835aa9f6d985 Mon Sep 17 00:00:00 2001
+From: Abdur Rehman <abdur_rehman@mentor.com>
+Date: Mon, 24 Oct 2016 20:24:32 +0500
+Subject: [PATCH] icedtea flags to compile with GCC 6
+
+Upstream bug filed here:
+https://bugs.openjdk.java.net/browse/JDK-8163032
+
+This patch combines the changes introduced by following commits:
+* http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/e34324d73cd5
+* http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/9e1264f51bae
+
+Upstream-Status: Backport
+
+Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
+---
+ openjdk/hotspot/make/linux/makefiles/gcc.make | 7 +++++++
+ openjdk/jdk/make/common/Defs-linux.gmk        | 8 +++++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+index 4ef0e49..bca3c5c 100644
+--- openjdk/hotspot/make/linux/makefiles/gcc.make
++++ openjdk/hotspot/make/linux/makefiles/gcc.make
+@@ -83,6 +83,7 @@ ifeq ($(TYPE),SHARK)
+ CFLAGS += $(LIBFFI_CFLAGS)
+ CFLAGS += $(LLVM_CFLAGS)
+ endif
++CFLAGS += -std=gnu++98
+ CFLAGS += $(VM_PICFLAG)
+ CFLAGS += -fno-rtti
+ CFLAGS += -fno-exceptions
+@@ -93,6 +94,12 @@ CFLAGS += -fcheck-new
+ ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+ CFLAGS += -fvisibility=hidden
+ endif
++# GCC 6 has more aggressive dead-store elimination which causes the VM to crash
++# It also optimises away null pointer checks which are still needed.
++# We turn both of these optimisations off.
++ifneq "$(shell expr \( $(CC_VER_MAJOR) \>= 6 \))" "0"
++CFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
++endif
+ 
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+ ARCHFLAG/i486    = -m32 -march=i586
+diff --git openjdk/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk
+index f64042c..727593c 100644
+--- openjdk/jdk/make/common/Defs-linux.gmk
++++ openjdk/jdk/make/common/Defs-linux.gmk
+@@ -217,6 +217,12 @@ CFLAGS_REQUIRED_ppc64   += -fno-tree-vectorize
+   CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
+   LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
+ endif
++# GCC 6 has more aggressive dead-store elimination which causes the VM to crash
++# It also optimises away null pointer checks which are still needed.
++# We turn both of these optimisations off.
++ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 6 ),1)
++ CFLAGS_REQUIRED += -fno-delete-null-pointer-checks -fno-lifetime-dse
++endif
+ 
+ # If this is a --hash-style=gnu system, use --hash-style=both
+ #   The gnu .hash section won't work on some Linux systems like SuSE 10.
+@@ -281,7 +287,7 @@ CFLAGS_OPT      = $(CC_OPT)
+ CFLAGS_DBG      = $(DEBUG_FLAG)
+ CFLAGS_COMMON += $(CFLAGS_REQUIRED)
+ 
+-CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
++CXXFLAGS_COMMON = -std=gnu++98 $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
+ CXXFLAGS_OPT	= $(CC_OPT)
+ CXXFLAGS_DBG	= $(DEBUG_FLAG)
+ CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
+-- 
+2.8.1
+
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
new file mode 100644
index 000000000000..533a04afb1ef
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-hotspot-fix-string-literal-marcos.patch
@@ -0,0 +1,26 @@
+--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+@@ -4378,9 +4378,9 @@
+ #define G1PPRL_DOUBLE_H_FORMAT        "  %14s"
+ 
+ // For summary info
+-#define G1PPRL_SUM_ADDR_FORMAT(tag)    "  "tag":"G1PPRL_ADDR_BASE_FORMAT
+-#define G1PPRL_SUM_BYTE_FORMAT(tag)    "  "tag": "SIZE_FORMAT
+-#define G1PPRL_SUM_MB_FORMAT(tag)      "  "tag": %1.2f MB"
++#define G1PPRL_SUM_ADDR_FORMAT(tag)    "  " tag ":"G1PPRL_ADDR_BASE_FORMAT
++#define G1PPRL_SUM_BYTE_FORMAT(tag)    "  " tag ": "SIZE_FORMAT
++#define G1PPRL_SUM_MB_FORMAT(tag)      "  " tag ": %1.2f MB"
+ #define G1PPRL_SUM_MB_PERC_FORMAT(tag) G1PPRL_SUM_MB_FORMAT(tag)" / %1.2f %%"
+ 
+ G1PrintRegionLivenessInfoClosure::
+--- openjdk/hotspot/src/share/vm/prims/unsafe.cpp
++++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp
+@@ -950,7 +950,7 @@
+   }
+ UNSAFE_END
+ 
+-#define DAC_Args CLS"[B["OBJ
++#define DAC_Args CLS "[B[" OBJ
+ // define a class but do not make it known to the class loader or system dictionary
+ // - host_class:  supplies context for linkage, access control, protection domain, and class loader
+ // - data:  bytes of a class file, a raw memory address (length gives the number of bytes)
diff --git a/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch b/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch
new file mode 100644
index 000000000000..09fbffe042c4
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-7/icedtea-specify-overloaded-variant-of-fmod.patch
@@ -0,0 +1,28 @@
+From 64a8800cd4efa15bf625227b7cd3a2e15ebfa359 Mon Sep 17 00:00:00 2001
+From: Abdur Rehman <abdur_rehman@mentor.com>
+Date: Tue, 25 Oct 2016 13:29:51 +0500
+Subject: [PATCH] arm32JIT.cpp: specify overloaded variant of fmod
+
+Upstream-Status: Pending
+
+Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
+---
+ openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
+index 089a1c9..4482fd6 100644
+--- openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
++++ openjdk/hotspot/src/cpu/zero/vm/arm32JIT.cpp
+@@ -8185,7 +8185,7 @@ handlers[H_INVOKEINTERFACE] = (unsigned)(cb->hp + INVOKEINTERFACE_STUB);
+ 
+   handlers[H_DREM] = out_pos(&codebuf);
+   stm(&codebuf, (1<<ARM_LR), ARM_SP, PUSH_FD, 1);
+-  mov_imm(&codebuf, ARM_IP, (u32)fmod);
++  mov_imm(&codebuf, ARM_IP, (u32)(double (*)(double, double))fmod);
+ #ifdef __ARM_PCS_VFP
+   vmov_reg_d_toVFP(&codebuf, VFP_D0, ARM_R0, ARM_R1);
+   vmov_reg_d_toVFP(&codebuf, VFP_D1, ARM_R2, ARM_R3);
+-- 
+2.8.1
+


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-08 13:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 13:39 [meta-java][PATCH] openjdk-7: fix compile errors with current poky master (gcc6) Richard Leitner
2017-04-28  8:19 ` Maxin B. John
2018-01-08 11:49 Jose Diaz de Grenu
2018-01-08 11:57 ` Richard Leitner
2018-01-08 12:05   ` Diaz de Grenu, Jose
2018-01-08 12:16     ` Mittal, Anuj
2018-01-08 12:22       ` Diaz de Grenu, Jose
2018-01-08 13:01         ` Maxin B. John

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.