From nobody Sun Jan 22 18:58:43 2023 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 4P0Mvl4Tslz3b2dk; Sun, 22 Jan 2023 18:58:43 +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 4P0Mvl3yQdz3pxN; Sun, 22 Jan 2023 18:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674413923; 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=fI/O3AU70ZAdM2vY+rRaX9X5T9X2XR2hcN9mzFbS+8w=; b=DRS0+lqAR7MC+uiYymYpK8sfaYttz1OpM9OJGjwAfKIDj8/ihjSaqwU56BDmU4008ggkwV Ouf+B8+gs3IReMMqk01mVbiaoS0Bq+pB1LACEI1D1B5VYli1QjZwCQXa/xnYXSd5excEaI 6IcJGUk8kPKfXB5cjjm9yawFYEgnomnHORJzx+wIOcw2GTzHxdMO3Ph+7d2l36XIgtFIOU Al98lmo1h7FPAIISvZon52T2VWmTvafL0L9CpiVBiE9VnGUVUPPm2nseLTPYdWEs5fJkNm Jjq6d06uV8ya4wfAoSSEA0dqJVV77C7qbJPzjqRYup7evRiIIyiE9BKPICLCTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674413923; 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=fI/O3AU70ZAdM2vY+rRaX9X5T9X2XR2hcN9mzFbS+8w=; b=HOPYemb+euygOz26WDNdYTycv2xd1THkkujKo4fRX9rP7XFkwnwIhY6q8tC59GQUVUoQei fkh2eAxY5X65ssOEW8sG6HgWtb/bSHEic325pMxSu8q9EKM8n9KmbKI0Ud/G7ZbCzFY0ip TSghAvzgArJOA0j9ciFgumYPDHsxR8nee/V/RTjUxC3gJijmyBN6u2tUA/GDMELnc1YfZA jgPixDA8Zv43og5xT/HlhsamSqFEk8sOGMUHa5ASmi8mnv+8vHCzhRzNlGYxxEXuKxNYAJ 1k7BC6Q2HDGurGQKpplJEs9chNTuUHMJRaa69TW/4CjPPCxGa6mwSjuhdr1Z1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674413923; a=rsa-sha256; cv=none; b=Av2rBVQIpnJWpdsVrb2kikbmC2MnDCZNbQRpw21kMencvlJ03CJhVcUJHUgfZQ9Au7in4j aO6MTCAoluGcmWoSyEsODjj+AmgyioQ/jj8EnwRwiQs6GpRH5XR9a2Zrwwchv0fkC/ubUc 81I8dFy8q+MbOLk8BQbLwsLvMpbC2KNShaEq/HfjvLnbb4yaxulRbFMyGkWuc5h5NHvD7Z gwrnixrhHRNvflcr+Fm8nWY0bQiQlABJjEyP73Y1Oy1j05z3LGvPtTx3hL4A1tOwVy3RbE R6aS22gXqAslbW3vTO86Hv3a6XU+b8HqsqiAbKGEf8woe/4KDVw17jqcOA0sgw== 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 4P0Mvl2l3hz10RR; Sun, 22 Jan 2023 18:58:43 +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 30MIwhTo068394; Sun, 22 Jan 2023 18:58:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30MIwhiV068393; Sun, 22 Jan 2023 18:58:43 GMT (envelope-from git) Date: Sun, 22 Jan 2023 18:58:43 GMT Message-Id: <202301221858.30MIwhiV068393@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: 55820d3f162a - main - java/eclipse: fix build with clang 15 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: 55820d3f162a65b9d284f1a5541965733c415a36 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=55820d3f162a65b9d284f1a5541965733c415a36 commit 55820d3f162a65b9d284f1a5541965733c415a36 Author: Dimitry Andric AuthorDate: 2023-01-18 20:11:36 +0000 Commit: Dimitry Andric CommitDate: 2023-01-22 18:58:23 +0000 java/eclipse: fix build with clang 15 During an exp-run for llvm 15 (see bug 265425), it turned out that java/eclipse failed to build with clang 15: [INFO] [exec] Building GTK3 bindings: [INFO] [exec] gmake[1]: Entering directory '/wrkdirs/usr/ports/java/eclipse/work/eclipse.platform.releng.aggregator-R4_24/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.freebsd.amd64/tmpdir' ... [INFO] [exec] cc -O -Wall -fPIC -DSWT_VERSION=4952r11 -DFREEBSD -DGTK -I`pkg-config --variable=prefix gtk+-3.0`/include -I/usr/local/openjdk11/include -I/usr/local/openjdk11/include/freebsd -DJNI64 -m64 -Werror `pkg-config --cflags gtk+-3.0 gtk+-unix-print-3.0` -c os.c [INFO] [exec] os.c:10086:31: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] [INFO] [exec] rc = (jint)((jint (*)())arg0)(arg1, arg2, arg3); [INFO] [exec] ^ [INFO] [exec] os.c:10098:31: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] [INFO] [exec] rc = (jint)((jint (*)())arg0)(arg1, arg2); [INFO] [exec] ^ [INFO] [exec] os.c:10704:33: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] [INFO] [exec] rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3, arg4); [INFO] [exec] ^ [INFO] [exec] os.c:10716:33: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] [INFO] [exec] rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3, arg4, arg5, arg6); [INFO] [exec] ^ [INFO] [exec] os.c:10728:33: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] [INFO] [exec] rc = (jlong)((jlong (*)())arg0)(arg1, arg2, arg3, arg4, arg5, arg6, arg7); [INFO] [exec] ^ These -Werror warnings are in code generated by JNIGenerator, so they cannot directly be fixed (at least not without hacking on JNIGenerator itself). Instead we need to add -Wno-deprecated-non-prototype for clang 15 and higher. To achieve this, we have to pass CFLAGS to MAVEN_ENV, and adjust the gtk build.sh script to respect the CFLAGS setting in the environment. PR: 269034 Approved by: jonc@chen.org.nz (maintainer) MFH: 2023Q1 --- java/eclipse/Makefile | 10 ++++++++-- java/eclipse/files/patch-eclipse.platform.swt | 7 +++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/java/eclipse/Makefile b/java/eclipse/Makefile index c51253580d9a..83ccfbd15d21 100644 --- a/java/eclipse/Makefile +++ b/java/eclipse/Makefile @@ -65,13 +65,19 @@ DESKTOP_ENTRIES="Eclipse" \ SUB_FILES= ${PORTNAME} -MAVEN_ENV= MAVEN_OPTS=-Xmx1024m CC=${CC} JAVA_HOME=${JAVA_HOME} HOME=${WRKDIR}/githome +MAVEN_ENV= MAVEN_OPTS=-Xmx1024m CC=${CC} CFLAGS="${CFLAGS}" JAVA_HOME=${JAVA_HOME} HOME=${WRKDIR}/githome MAVEN_ECLIPSE= -Dmaven.repo.local=${WRKDIR}/eclipse-maven-repo-${PORTVERSION} \ -Dnative=gtk.freebsd.${ARCH} \ -DforceContextQualifier=v${ECLIPSE_TSTAMP} ECLIPSE_RESULT= eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/products/org.eclipse.sdk.ide-freebsd.gtk.${ARCH}.tar.gz +.include + +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 150 +CFLAGS+= -Wno-deprecated-non-prototype +.endif + do-build: cd ${WRKSRC} && ${SETENV} ${MAVEN_ENV} mvn --offline ${MAVEN_ECLIPSE} -DskipTests clean verify @@ -85,4 +91,4 @@ post-install: cd ${STAGEDIR}${PREFIX} && ${FIND} -s bin/${PORTNAME} share/${PORTNAME} -not -type d >> ${TMPPLIST} cd ${STAGEDIR}${PREFIX} && ${FIND} -ds share/${PORTNAME} -type d | ${SED} -e 's,^,@dir ,' >> ${TMPPLIST} -.include +.include diff --git a/java/eclipse/files/patch-eclipse.platform.swt b/java/eclipse/files/patch-eclipse.platform.swt index dc00b69720aa..f767ccd32b14 100644 --- a/java/eclipse/files/patch-eclipse.platform.swt +++ b/java/eclipse/files/patch-eclipse.platform.swt @@ -53,15 +53,18 @@ diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/ diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh 0000-00-00 00:00:00.000000000 +0000 -@@ -72,7 +72,7 @@ +@@ -72,9 +72,9 @@ cd `dirname $0` -MAKE_TYPE=make +MAKE_TYPE=gmake - export CFLAGS='-O -Wall -fPIC' +-export CFLAGS='-O -Wall -fPIC' ++export CFLAGS="${CFLAGS--O -Wall} -fPIC" + # Determine which OS we are on + if [ "${OS}" = "" ]; then @@ -86,27 +86,30 @@ MAKEFILE=make_win32.mak ;;