From nobody Mon Apr 04 08:09:52 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B2C851A63454; Mon, 4 Apr 2022 08:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KX3NJ4d6pz4lRk; Mon, 4 Apr 2022 08:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649059792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IK2KDRcLi99F+yTHdHbyyVAt0TQie19MebyqnKUt/5Y=; b=X+83Ae49WFKtwobV6ym1e1kHJ3XuJnOmuKvG/RBIosxoJoQr0WFoc1ehH9jQv0nMPvxJ3G MooNYFD2XVcnqqfvFL9uQiSDz7v6ul0Y4u6fNwL6/bs3qVaxdnx7V3M7fPxRIvLCt/1S4f dOAVaLdnNKt7qEcJ8Ut55t9JQIpEwwkMcCPbIiXW6QGuWG4ZgGB9s2MJpiNpOT8FMR7Ntb KVYSUksXDN+Jj7ecicEbR9/d9CbGAnhx4WniPVLkBY6SfFRtkfS+TksgRRXaBtg9vHhIW5 FOG/ZLTnSkMbhA4gPYKmDI/JPELyaGobXh7lI6OVJK97BpYXyfKGVtQRIKePzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AAAF6508; Mon, 4 Apr 2022 08:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23489qjm043946; Mon, 4 Apr 2022 08:09:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23489qAq043945; Mon, 4 Apr 2022 08:09:52 GMT (envelope-from git) Date: Mon, 4 Apr 2022 08:09:52 GMT Message-Id: <202204040809.23489qAq043945@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: e406118f7741 - main - java/openjdk13 java/openjdk14 java/openjdk15 java/openjdk16 java/openjdk17 java/openjdk17-jre: fix build with clang 14 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e406118f774154589b91dc8d84f7f0320766d5a4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649059792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IK2KDRcLi99F+yTHdHbyyVAt0TQie19MebyqnKUt/5Y=; b=Ncp7ng43QEXggf/f9FkNRdC2afdfWv728++v1H5atMEdFnseHpIv5h//L6h40vLis1sPAP u9jRc0todkeBCUIhQUm2NeoBBGIAh69fHTDQXli9oNOjPXr1fWMU/c9N1MoG4e2XsCqoEr BFYzL9Ca4yAjZEhR8pEsLBvuC6KC1iakuelSZCZMAsBXGtaIiARsqIZYPEhxSjwzaEATcT dFKOZJD1HAm9jUGtDW1B2W2MQRZ/AV64O8FY9fByQV3TjwByb7SvufEFYOUML+Y7lb0E9/ AaWvMh2N2EJ49IAe6mU7Twwo/Rv+iQER7iNwyf1sxEznmqX6kzYlcmbxNy9Ggw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649059792; a=rsa-sha256; cv=none; b=R1dD0SV99xSXztTgTqL7IoMKOWkJ0IiZ/TZx+uUXtcVDmsTEktEeD5rnwWnC5b/AKEm+P/ wDpIUnBm+LPp9gfyq0vAoqnARJCgWeydwy6/iP6bKCNEFAV2YNIvMrMFLOGdB/J7bhpNpQ JwW17jV5M6SbLocYf8SiAlGa+C9WIA8Hk5EVGkiAaR4drlpJjWVdC4t39j4x7+h8i0Af4R aI/5h3Cllo10rUOAtOrcMhwtVMMSt5TkYPDt7DYEtRPItJNX3qbBYcQ61G7/MjogiNFeWv 0uL4nOuIZ4et3lZbLLXCTp/wIgSILJRUG6O4b2z+5izxEQBdQgDw7H7zyilddA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=e406118f774154589b91dc8d84f7f0320766d5a4 commit e406118f774154589b91dc8d84f7f0320766d5a4 Author: Dimitry Andric AuthorDate: 2022-03-26 19:47:44 +0000 Commit: Dimitry Andric CommitDate: 2022-04-04 07:56:40 +0000 java/openjdk13 java/openjdk14 java/openjdk15 java/openjdk16 java/openjdk17 java/openjdk17-jre: fix build with clang 14 During an exp-run for llvm 14 (see bug 261742), it turned out that java/openjdk13 and java/openjdk17 fail to build with clang 14 (but this also affects openjdk14 through 16): === Output from failing command(s) repeated here === * For target hotspot_variant-server_libjvm_objs_serviceThread.o: /wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] while (((sensors_changed = LowMemoryDetector::has_pending_requests()) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: note: cast one or both operands to int to silence this warning /wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] while (((sensors_changed = LowMemoryDetector::has_pending_requests()) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: note: cast one or both operands to int to silence this warning /wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] while (((sensors_changed = LowMemoryDetector::has_pending_requests()) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: note: cast one or both operands to int to silence this warning /wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] while (((sensors_changed = LowMemoryDetector::has_pending_requests()) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... (rest of output omitted) Although the warning is normally an indication of a potential problem, in this case a comment just before the affected code explictly mentions the reason for using bitwise '|' instead of logical '||': // Process all available work on each (outer) iteration, rather than // only the first recognized bit of work, to avoid frequently true early // tests from potentially starving later work. Hence the use of // arithmetic-or to combine results; we don't want short-circuiting. (See ) Therefore, we should suppress -Wbitwise-instead-of-logical for clang 14 and higher. PR: 262845 Approved by: portmgr (build fix blanket) MFH: 2022Q2 --- java/openjdk13/Makefile | 7 ++++++- java/openjdk14/Makefile | 7 ++++++- java/openjdk15/Makefile | 7 ++++++- java/openjdk16/Makefile | 7 ++++++- java/openjdk17/Makefile | 7 ++++++- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/java/openjdk13/Makefile b/java/openjdk13/Makefile index c78fdded6489..a187baee5ad6 100644 --- a/java/openjdk13/Makefile +++ b/java/openjdk13/Makefile @@ -130,7 +130,12 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA .else MAKE_ENV+= USE_CLANG=true .if ${COMPILER_VERSION} >= 130 -CONFIGURE_ARGS+= --with-extra-cflags="-Wno-unused-but-set-parameter" +EXTRA_CFLAGS+= -Wno-unused-but-set-parameter +.if ${COMPILER_VERSION} >= 140 +EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical +.endif +CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}" +CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}" .endif .endif diff --git a/java/openjdk14/Makefile b/java/openjdk14/Makefile index eaf7ae811e30..5c01e6bb95e2 100644 --- a/java/openjdk14/Makefile +++ b/java/openjdk14/Makefile @@ -132,7 +132,12 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA .else MAKE_ENV+= USE_CLANG=true .if ${COMPILER_VERSION} >= 130 -CONFIGURE_ARGS+= --with-extra-cflags="-Wno-unused-but-set-parameter" +EXTRA_CFLAGS+= -Wno-unused-but-set-parameter +.if ${COMPILER_VERSION} >= 140 +EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical +.endif +CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}" +CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}" .endif .endif diff --git a/java/openjdk15/Makefile b/java/openjdk15/Makefile index 28e44f2ea369..acd497b76ea2 100644 --- a/java/openjdk15/Makefile +++ b/java/openjdk15/Makefile @@ -131,7 +131,12 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA .else MAKE_ENV+= USE_CLANG=true .if ${COMPILER_VERSION} >= 130 -CONFIGURE_ARGS+= --with-extra-cflags="-Wno-unused-but-set-parameter" +EXTRA_CFLAGS+= -Wno-unused-but-set-parameter +.if ${COMPILER_VERSION} >= 140 +EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical +.endif +CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}" +CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}" .endif .endif diff --git a/java/openjdk16/Makefile b/java/openjdk16/Makefile index 4d7f95959c51..bba4b4283847 100644 --- a/java/openjdk16/Makefile +++ b/java/openjdk16/Makefile @@ -134,7 +134,12 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA .else MAKE_ENV+= USE_CLANG=true .if ${COMPILER_VERSION} >= 130 -CONFIGURE_ARGS+= --with-extra-cflags="-Wno-unused-but-set-parameter" +EXTRA_CFLAGS+= -Wno-unused-but-set-parameter +.if ${COMPILER_VERSION} >= 140 +EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical +.endif +CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}" +CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}" .endif .endif diff --git a/java/openjdk17/Makefile b/java/openjdk17/Makefile index 04dd691cf65f..056911944d74 100644 --- a/java/openjdk17/Makefile +++ b/java/openjdk17/Makefile @@ -149,7 +149,12 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA .else MAKE_ENV+= USE_CLANG=true .if ${COMPILER_VERSION} >= 130 -CONFIGURE_ARGS+= --with-extra-cflags="-Wno-unused-but-set-parameter" +EXTRA_CFLAGS+= -Wno-unused-but-set-parameter +.if ${COMPILER_VERSION} >= 140 +EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical +.endif +CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}" +CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}" .endif .endif