[11u] RFR 8210782: Upgrade HarfBuzz to the latest 2.3.1
Langer, Christoph
christoph.langer at sap.com
Tue Apr 30 09:26:25 UTC 2019
Hi,
please help reviewing the backport of JDK-8210782: Upgrade HarfBuzz to the latest 2.3.1.
This has been backported to 11.0.4-oracle already. I took the large change down to 11u-dev. It applies quite nicely, apart from a little issue in make/lib/Awt2dLibraries.gmk:
--- Awt2dLibraries.gmk
+++ Awt2dLibraries.gmk
@@ -613,8 +614,7 @@
type-limits missing-field-initializers implicit-fallthrough \
strict-aliasing undef unused-function, \
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
- maybe-uninitialized \
- missing-attributes class-memaccess, \
+ maybe-uninitialized class-memaccess, \
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
tautological-constant-out-of-range-compare int-to-pointer-cast \
sign-compare undef missing-field-initializers, \
The original change would remove the disabling of the "missing-attributes" warnings, but since this warning type is not disabled in jdk11u-dev currently, I would just skip that diff.
With that change, most platforms did build fine, except for Solaris (where we use Oracle Studio 12u4 in jdk11u-dev vs Oracle Studio 12u6 in jdk/jdk) and AIX (xlc12 vs. xlc16).
To keep support for Oracle Studio 12u4 for Solaris, I had to remove the warning flag "refmemnoconstr_aggr" from line 622 (as opposed to the original change). Seems that it is not yet supported in OS12u4.
Furthermore, a code tweak had to be done (Thanks, Matthias, for your help here):
--- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff-common.hh Fri Mar 01 16:59:19 2019 -0800
+++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff-common.hh Mon Apr 29 16:26:41 2019 +0200
@@ -280,6 +280,10 @@
{
str_buff_t &flatStr;
bool drop_hints;
+
+ // Solaris: OS12u4 complains about "A class with a reference member lacks a user-defined constructor"
+ // so provide the constructor
+ flatten_param_t(str_buff_t& sbt, bool dh) : flatStr(sbt), drop_hints(dh) {}
};
template <typename ACC, typename ENV, typename OPSET>
@@ -305,7 +309,9 @@
return false;
cs_interpreter_t<ENV, OPSET, flatten_param_t> interp;
interp.env.init (str, acc, fd);
- flatten_param_t param = { flat_charstrings[i], drop_hints };
+ // Solaris: OS12u4 does not like the C++11 style init
+ // flatten_param_t param = { flat_charstrings[i], drop_hints };
+ flatten_param_t param(flat_charstrings[i], drop_hints);
if (unlikely (!interp.interpret (param)))
return false;
}
For AIX, this tweak had to be added (credit goes to Matthias as well):
diff -r 2b3dbedfbfb9 src/java.desktop/share/native/libfontmanager/harfbuzz/hb-null.hh
--- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-null.hh Fri Mar 01 16:59:19 2019 -0800
+++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-null.hh Mon Apr 29 16:26:41 2019 +0200
@@ -83,7 +83,9 @@
template <typename T, typename V, typename B>
struct _hb_assign
-{ static inline void value (T &o, const V v) { o = v; } };
+// add cast to please AIX xlc12.1
+//{ static inline void value (T &o, const V v) { o = v; } };
+{ static inline void value (T &o, const V v) { o = (T&) v; } };
template <typename T, typename V>
struct _hb_assign<T, V, _hb_bool_type<(bool) (1 + (unsigned int) T::min_size)> >
{ static inline void value (T &o, const V v) { o.set (v); } };
Bug: https://bugs.openjdk.java.net/browse/JDK-8210782
Original Change: http://hg.openjdk.java.net/jdk/jdk/rev/7c11a7cc7c1d
Review discussion for jdk/jdk: https://mail.openjdk.java.net/pipermail/2d-dev/2019-March/009914.html
New Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8210782.jdk11u/
Thanks & Best regards
Christoph
More information about the jdk-updates-dev
mailing list