git: c9213ef4667d - stable/14 - tests/fusefs: fix the build with gcc 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 14 Sep 2026 14:47:19 UTC
The branch stable/14 has been updated by siva:
URL: https://cgit.FreeBSD.org/src/commit/?id=c9213ef4667dac484113ef95f4bed7c39acd8203
commit c9213ef4667dac484113ef95f4bed7c39acd8203
Author: Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-08 20:10:51 +0000
Commit: Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-09-14 14:32:22 +0000
tests/fusefs: fix the build with gcc 16
Reviewed by: asomers
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 0e3dae1ca8fc371eb5c451032adc5e0813b00db6)
---
tests/sys/fs/fusefs/Makefile | 7 +++++++
tests/sys/fs/fusefs/utils.cc | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile
index 00c879b53d7c..1293373e2451 100644
--- a/tests/sys/fs/fusefs/Makefile
+++ b/tests/sys/fs/fusefs/Makefile
@@ -108,6 +108,13 @@ ${f}: ${MOUNT}/${f} .NOMETA
ln -sf ${.ALLSRC} ${.TARGET}
.endfor
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 160000
+# gcc 16's aggressive inlining hits max-inline-insns-* limits and
+# fails on these sources. Use a lower optimization setting to
+# fix the build.
+CXXFLAGS+= -O1
+.endif
+
LIBADD+= pthread
LIBADD+= gmock gtest
LIBADD+= util
diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc
index 125b7e2d6fc7..6f6bd1650848 100644
--- a/tests/sys/fs/fusefs/utils.cc
+++ b/tests/sys/fs/fusefs/utils.cc
@@ -182,7 +182,7 @@ void FuseTest::SetUp() {
_)
).Times(AnyNumber())
.WillRepeatedly(Invoke(ReturnErrno(ENOSYS)));
- } catch (std::system_error err) {
+ } catch (std::system_error const& err) {
FAIL() << err.what();
}
}