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>