Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Aug 2022 14:55:24 GMT
From:      =?utf-8?Q?Stefan=20E=C3=9Fer?= <se@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3d41392b6e04 - main - java/openjdk11: fix build on 13.1 and -CURRENT
Message-ID:  <202208281455.27SEtOqd062640@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3d41392b6e049ff56d2abf91749a82573eb3198d

commit 3d41392b6e049ff56d2abf91749a82573eb3198d
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2022-08-28 14:40:46 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-08-28 14:54:31 +0000

    java/openjdk11: fix build on 13.1 and -CURRENT
    
    Recent LLVM versions issue warnings for "|" being used with boolean
    operands. Such operations exist in OpenJDK and the source lines are
    marked with comments to not use logical operations instead.
    
    This breaks the build on 13.1 and -CURRENT when building with LLVM-13
    or newer due to the -Werror option being passed to the compiler.
    
    Fix this issue by casting one of the boolean operands to int, as
    suggested by the compiler in the error message for the case that the
    "|" operation should actually be used on purpose.
    
    I had submitted this patch as an attachment to PR 265687 on
    2022-08-07, but it has been ignored by the maintainer (java team).
    
    PR:             265687
    Approved by:    portmgr (implicit)
---
 ...are_native_libharfbuzz_hb-ot-layout-gpos-table.hh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/java/openjdk11/files/patch-src_java.desktop_share_native_libharfbuzz_hb-ot-layout-gpos-table.hh b/java/openjdk11/files/patch-src_java.desktop_share_native_libharfbuzz_hb-ot-layout-gpos-table.hh
new file mode 100644
index 000000000000..786d03c4dd8a
--- /dev/null
+++ b/java/openjdk11/files/patch-src_java.desktop_share_native_libharfbuzz_hb-ot-layout-gpos-table.hh
@@ -0,0 +1,20 @@
+--- src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh.orig	2022-07-20 05:18:35 UTC
++++ src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh
+@@ -1128,7 +1128,7 @@ struct PairSet
+     if (record)
+     {
+       /* Note the intentional use of "|" instead of short-circuit "||". */
+-      if (valueFormats[0].apply_value (c, this, &record->values[0], buffer->cur_pos()) |
++	    if ((int)valueFormats[0].apply_value (c, this, &record->values[0], buffer->cur_pos()) |
+           valueFormats[1].apply_value (c, this, &record->values[len1], buffer->pos[pos]))
+         buffer->unsafe_to_break (buffer->idx, pos + 1);
+       if (len2)
+@@ -1414,7 +1414,7 @@ struct PairPosFormat2
+ 
+     const Value *v = &values[record_len * (klass1 * class2Count + klass2)];
+     /* Note the intentional use of "|" instead of short-circuit "||". */
+-    if (valueFormat1.apply_value (c, this, v, buffer->cur_pos()) |
++    if ((int)valueFormat1.apply_value (c, this, v, buffer->cur_pos()) |
+         valueFormat2.apply_value (c, this, v + len1, buffer->pos[skippy_iter.idx]))
+       buffer->unsafe_to_break (buffer->idx, skippy_iter.idx + 1);
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208281455.27SEtOqd062640>