FreeBSD Bugzilla – Attachment 248159 Details for
Bug 276804
devel/bossa: fix build with clang 18
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel/bossa: fix build with clang 18
devel__bossa-fix-clang18-build-1.diff (text/plain), 1.65 KB, created by
Dimitry Andric
on 2024-02-03 13:26:48 UTC
(
hide
)
Description:
devel/bossa: fix build with clang 18
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2024-02-03 13:26:48 UTC
Size:
1.65 KB
patch
obsolete
>commit 3b62be5472b5a5bb933b5625b250f92bb0949192 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2024-02-03T14:21:20+01:00 > > devel/bossa: fix build with clang 18 > > Clang 18 has a new warning about variable length arrays used in C++, > which is emitted when building devel/bossa: > > src/Flasher.cpp:115:28: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] > 115 | uint8_t buffer[bufferSize]; > | ^~~~~~~~~~ > src/Flasher.cpp:115:28: note: read of non-const variable 'bufferSize' is not allowed in a constant expression > src/Flasher.cpp:114:22: note: declared here > 114 | uint32_t bufferSize = _samba.writeBufferSize(); > | ^ > [... more of these ...] > > Since refactoring the code to no longer use VLAs is rather intrusive, > suppress the warnings instead. > > PR: 276804 > MFH: 2024Q1 > >diff --git a/devel/bossa/Makefile b/devel/bossa/Makefile >index ddffddb09b6c..463f57f6015f 100644 >--- a/devel/bossa/Makefile >+++ b/devel/bossa/Makefile >@@ -32,6 +32,12 @@ BOSSASH_DESC= Include BOSSA Shell > BOSSASH_USES= readline > BOSSASH_ALL_TARGET= bin/bossash > >+.include <bsd.port.pre.mk> >+ >+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 180 >+CXXFLAGS+= -Wno-vla-cxx-extension >+.endif >+ > post-extract: > ${REINPLACE_CMD} -e 's/wx-config/$${WX_CONFIG}/' ${WRKSRC}/Makefile > >@@ -44,4 +50,4 @@ do-install-BOSSA-on: > do-install-BOSSASH-on: > ${INSTALL_PROGRAM} ${WRKSRC}/bin/bossash ${STAGEDIR}${PREFIX}/bin/bossash > >-.include <bsd.port.mk> >+.include <bsd.port.post.mk>
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 276804
: 248159