openjdk7: fix arm32JIT with current gcc versions by disabling optimizer
PATCH 1/1 openjdk7: fix arm32JIT with current gcc versions by disabling optimizer
This works around a severe error in the arm32JIT when built with current gcc cross compiler versions with O1 (or higher) set.
There were different errors thrown for this problem when built on different machines, some of them are:
fatal error: only PUSH_EA or PUSH_FD available on Thumb
or
Segmentation Fault
or
Illegal instruction
The currently only "solution" found was to disable the optimizer completely. This is a quite dirty fix, and more elegant fixes are warmly welcome!
Signed-off-by Richard Leitner <[email protected]>
--- recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb | 11 +++++++++++ 1 file changed, 11 insertions(+)
recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb +11 -0
@@ -78,3 +78,14 @@ export DISTRIBUTION_PATCHES # # NOTE: When updating the recipe, please check if this is still needed CFLAGS_append = " -Wno-error=deprecated-declarations -Wno-error=narrowing -fpermissive" + +# the zero arm32JIT crashes during runtime when built with current gcc versions. +# The following compile adaptions provide a workaround for this issues. +ARM_INSTRUCTION_SET = "arm" +TARGET_CFLAGS_remove_arm = "-O2" +TARGET_CXXFLAGS_remove_arm = "-O2" +TARGET_CPPFLAGS_remove_arm = "-O2" +CFLAGS_remove_arm = "-O2" +CXXFLAGS_remove_arm = "-O2" +CXXFLAGS_append_arm = " -O0" +CFLAGS_append_arm = " -O0"
Signature · 1 line
2.20.1