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-cross.inc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'recipes-core/openjdk/openjdk-8-cross.inc') diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc index 3189764..11e94ce 100644 --- a/recipes-core/openjdk/openjdk-8-cross.inc +++ b/recipes-core/openjdk/openjdk-8-cross.inc @@ -39,9 +39,6 @@ SRC_URI_append = "\ file://jvm.cfg \ " -# 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)} \ \ @@ -53,6 +50,10 @@ EXTRA_OECONF_append = "\ --disable-precompiled-headers \ --disable-zip-debug-info \ \ + --with-extra-cflags='${CFLAGS}' \ + --with-extra-cxxflags='${CXXFLAGS}' \ + --with-extra-ldflags='${LDFLAGS}' \ + \ ${@jdk_configure_options(d)} \ " @@ -83,10 +84,6 @@ export MFLAGS="${@jdk_make_options(d)} MAKE_VERBOSE=y QUIETLY= VERBOSE=-s LOG_LE BUILD_LD="${BUILD_CCLD}" EXTRA_OEMAKE_append = '\ - OE_CFLAGS="${CFLAGS}" \ - OE_CPPFLAGS="${CPPFLAGS}" \ - OE_CXXFLAGS="${CXXFLAGS}" \ - OE_LDFLAGS="${LDFLAGS}" \ ${@jdk_make_options(d)} \ ALT_SDT_H="${STAGING_INCDIR}" \ ALT_CUPS_HEADERS_PATH="${STAGING_INCDIR}" \ -- cgit v1.2.3-54-g00ecf