From 33ddb28a6428b02ddcc82d1954ecf27cd426fbb5 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Wed, 22 Jun 2016 10:38:45 -0600 Subject: openjdk-8: make GCC6 happy GCC 6 sets the default C++ standard to C++14 and introduces dead store elimination by default. OpenJDK 8 is not ready for either of these changes, so set the C++ standard back to gnu++98 and disable dead store elimination. Switched to using --with-extra-cflags, cxxflags, and ldflags. The added patch fixes building when using those flags, and are needed to get CFLAGS into the JDK build in the native case. Signed-off-by: Daniel McGregor Signed-off-by: Otavio Salvador --- recipes-core/openjdk/openjdk-8-native.inc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'recipes-core/openjdk/openjdk-8-native.inc') diff --git a/recipes-core/openjdk/openjdk-8-native.inc b/recipes-core/openjdk/openjdk-8-native.inc index 7a37d1a..91080d2 100644 --- a/recipes-core/openjdk/openjdk-8-native.inc +++ b/recipes-core/openjdk/openjdk-8-native.inc @@ -15,15 +15,16 @@ PACKAGECONFIG[cups] = "--with-cups,,cups" PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native" PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," -# do not use --wth-extra-cflags, it breaks building demos for jdk -# maybe disabling demos is more reasonable than avoiding --wth-extra-cflags -# needs discussion EXTRA_OECONF_append = "\ --with-jobs=${@get_jdk8_native_jobs(d)} \ \ --with-sys-root=${STAGING_DIR_NATIVE} \ --with-tools-dir=${STAGING_DIR_NATIVE} \ --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/icedtea7-native \ + --with-extra-cflags='${CFLAGS}' \ + --with-extra-cxxflags='${CXXFLAGS}' \ + --with-extra-ldflags='${LDFLAGS}' \ + --with-stdc++lib=dynamic \ ${@jdk_configure_options(d)} \ " # --with-boot-jdk=${WORKDIR}/fake-jdk @@ -32,18 +33,14 @@ inherit native require openjdk-8-common.inc -CFLAGS_append = "${@jdk_cpp_options(d)}" +CFLAGS_append = " ${@jdk_cpp_options(d)}" CPPFLAGS_append = "${@jdk_cpp_options(d)}" -CXXFLAGS_append = "${@jdk_cpp_options(d)}" +CXXFLAGS_append = " ${@jdk_cpp_options(d)}" export MAKE_VERBOSE = "y" export MFLAGS="${@jdk_make_options(d)} MAKE_VERBOSE=y QUIETLY= VERBOSE=-s LOG_LEVEL=trace" EXTRA_OEMAKE_append = ' \ - OE_CFLAGS="${CFLAGS}" \ - OE_CPPFLAGS="${CPPFLAGS}" \ - OE_CXXFLAGS="${CXXFLAGS}" \ - OE_LDFLAGS="${LDFLAGS}" \ ${@jdk_make_options(d)} \ MAKE_VERBOSE=y VERBOSE=-s LOG_LEVEL=trace \ QUIETLY= \ -- cgit v1.2.3-54-g00ecf