diff options
author | Daniel McGregor <daniel.mcgregor@vecima.com> | 2016-06-22 10:38:45 -0600 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-06-30 12:07:44 -0300 |
commit | 33ddb28a6428b02ddcc82d1954ecf27cd426fbb5 (patch) | |
tree | eb39d51b3b35a2a3096bfd79ca95e2179dd0be8c /recipes-core/openjdk/openjdk-8-native.inc | |
parent | 6483010d92be7f6e1e0a268d1ca4b5fc4353c70e (diff) | |
download | meta-java-33ddb28a6428b02ddcc82d1954ecf27cd426fbb5.tar.gz |
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 <daniel.mcgregor@vecima.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-core/openjdk/openjdk-8-native.inc')
-rw-r--r-- | recipes-core/openjdk/openjdk-8-native.inc | 15 |
1 files changed, 6 insertions, 9 deletions
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" | |||
15 | PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native" | 15 | PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native" |
16 | PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," | 16 | PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," |
17 | 17 | ||
18 | # do not use --wth-extra-cflags, it breaks building demos for jdk | ||
19 | # maybe disabling demos is more reasonable than avoiding --wth-extra-cflags | ||
20 | # needs discussion | ||
21 | EXTRA_OECONF_append = "\ | 18 | EXTRA_OECONF_append = "\ |
22 | --with-jobs=${@get_jdk8_native_jobs(d)} \ | 19 | --with-jobs=${@get_jdk8_native_jobs(d)} \ |
23 | \ | 20 | \ |
24 | --with-sys-root=${STAGING_DIR_NATIVE} \ | 21 | --with-sys-root=${STAGING_DIR_NATIVE} \ |
25 | --with-tools-dir=${STAGING_DIR_NATIVE} \ | 22 | --with-tools-dir=${STAGING_DIR_NATIVE} \ |
26 | --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/icedtea7-native \ | 23 | --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/icedtea7-native \ |
24 | --with-extra-cflags='${CFLAGS}' \ | ||
25 | --with-extra-cxxflags='${CXXFLAGS}' \ | ||
26 | --with-extra-ldflags='${LDFLAGS}' \ | ||
27 | --with-stdc++lib=dynamic \ | ||
27 | ${@jdk_configure_options(d)} \ | 28 | ${@jdk_configure_options(d)} \ |
28 | " | 29 | " |
29 | # --with-boot-jdk=${WORKDIR}/fake-jdk | 30 | # --with-boot-jdk=${WORKDIR}/fake-jdk |
@@ -32,18 +33,14 @@ inherit native | |||
32 | 33 | ||
33 | require openjdk-8-common.inc | 34 | require openjdk-8-common.inc |
34 | 35 | ||
35 | CFLAGS_append = "${@jdk_cpp_options(d)}" | 36 | CFLAGS_append = " ${@jdk_cpp_options(d)}" |
36 | CPPFLAGS_append = "${@jdk_cpp_options(d)}" | 37 | CPPFLAGS_append = "${@jdk_cpp_options(d)}" |
37 | CXXFLAGS_append = "${@jdk_cpp_options(d)}" | 38 | CXXFLAGS_append = " ${@jdk_cpp_options(d)}" |
38 | 39 | ||
39 | export MAKE_VERBOSE = "y" | 40 | export MAKE_VERBOSE = "y" |
40 | export MFLAGS="${@jdk_make_options(d)} MAKE_VERBOSE=y QUIETLY= VERBOSE=-s LOG_LEVEL=trace" | 41 | export MFLAGS="${@jdk_make_options(d)} MAKE_VERBOSE=y QUIETLY= VERBOSE=-s LOG_LEVEL=trace" |
41 | 42 | ||
42 | EXTRA_OEMAKE_append = ' \ | 43 | EXTRA_OEMAKE_append = ' \ |
43 | OE_CFLAGS="${CFLAGS}" \ | ||
44 | OE_CPPFLAGS="${CPPFLAGS}" \ | ||
45 | OE_CXXFLAGS="${CXXFLAGS}" \ | ||
46 | OE_LDFLAGS="${LDFLAGS}" \ | ||
47 | ${@jdk_make_options(d)} \ | 44 | ${@jdk_make_options(d)} \ |
48 | MAKE_VERBOSE=y VERBOSE=-s LOG_LEVEL=trace \ | 45 | MAKE_VERBOSE=y VERBOSE=-s LOG_LEVEL=trace \ |
49 | QUIETLY= \ | 46 | QUIETLY= \ |