FreeBSD Bugzilla – Attachment 238784 Details for
Bug 268366
java/openjdk17: fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
java/openjdk17: fix build with clang 15
java__openjdk17-fix-clang15-build-2.diff (text/plain), 3.01 KB, created by
Dimitry Andric
on 2022-12-14 14:09:17 UTC
(
hide
)
Description:
java/openjdk17: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-12-14 14:09:17 UTC
Size:
3.01 KB
patch
obsolete
>commit ce394eea5336a8c47ed6bab9b578e85a84f30392 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Wed Dec 14 13:43:35 2022 +0100 > > java/openjdk17: fix build with clang 15 > > During an exp-run for llvm 15 (see bug 265425), it turned out that > java/openjdk17 failed to build with clang 15: > > /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.5-8-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:374:41: 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] > proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error); > ^ > /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.5-8-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:393:63: 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] > (*g_network_address_parse_uri)(proxies[i], 0, > ^ > /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.5-8-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:398:70: 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] > phost = (*g_network_address_get_hostname)(conn); > ^ > /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.5-8-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:399:66: 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] > pport = (*g_network_address_get_port)(conn); > ^ > /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.5-8-1/src/java.base/unix/native/libnet/DefaultProxySelector.c:435:22: 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] > (*g_strfreev)(proxies); > ^ > > This is because clang 15 warns by default about functions without > arguments in their prototypes. Fix this by suppressing the warning. > >diff --git a/java/openjdk17/Makefile b/java/openjdk17/Makefile >index fc766bdd9b06..de5545c86a20 100644 >--- a/java/openjdk17/Makefile >+++ b/java/openjdk17/Makefile >@@ -145,6 +145,9 @@ EXTRA_CFLAGS+= -Wno-unused-but-set-parameter > .if ${COMPILER_VERSION} >= 140 > EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical > .endif >+.if ${COMPILER_VERSION} >= 150 >+EXTRA_CFLAGS+= -Wno-deprecated-non-prototype >+.endif > CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}" > CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}" > .endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268366
:
238777
| 238784