From 15cfe90d621b805a1d16295c1cde37797fdca9ad Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 6 Aug 2026 10:05:27 -0400 Subject: [PATCH] follow-up: build with Qt6 support on Linux with Qt 6.1 1d3178a quieted the g++ build, but made the warnings even worse with a clang build. The addition of the -Wno-sfinae-incomplete caused an unrecognized option warning using recent clang. Recent clang build with Qt6.1 also caused several warnings during the processing of the Qt6.1 header files related to c++26-extensions. This adds (under Linux) -Wnoc++-26-extensions to the clang++ command line to quiet those warnings and restricts the -Wno-sfinae-incomplete command line option to the g++ build. --- sys/unix/hints/include/compiler.500 | 9 ++++++--- sys/unix/hints/linux.500 | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/unix/hints/include/compiler.500 b/sys/unix/hints/include/compiler.500 index 59c6e29ef..e0f5eb466 100755 --- a/sys/unix/hints/include/compiler.500 +++ b/sys/unix/hints/include/compiler.500 @@ -138,9 +138,6 @@ CCXXFLAGS+=-Wall -Wextra -Wno-missing-field-initializers \ -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings CCXXFLAGS+=-pedantic CCXXFLAGS+=-Wmissing-declarations -ifdef ADDITIONAL_NO_WARN -CCXXFLAGS+=$(ADDITIONAL_NO_WARN) -endif #detection of clang++ vs g++ CXXISCLANG := $(shell echo `$(CXX) --version` | grep clang) ifeq "$(CXXISCLANG)" "" @@ -179,6 +176,9 @@ else # g++ version greater than or equal to 9? (no follows) CCXX=g++ -std=c++17 endif # g++ version greater than or equal to 9 endif # CPLUSPLUS_NEED20 +ifdef ADDITIONAL_NO_WARN_GPPCCX +CCXXFLAGS+=$(ADDITIONAL_NO_WARN_GPPCCX) +endif else # g++ or clang++ ? @@ -219,6 +219,9 @@ ifeq "$(CLANGPPGTEQ17)" "1" CCXX=clang++ -std=c++20 endif # clang++ greater than or equal to 17 endif # CPLUSPLUS_NEED20 +ifdef ADDITIONAL_NO_WARN_CLANGCCX +CCXXFLAGS+=$(ADDITIONAL_NO_WARN_CLANGCCX) +endif endif # end of clang++-specific section CXX=$(CCXX) endif # CPLUSPLUS_NEEDED diff --git a/sys/unix/hints/linux.500 b/sys/unix/hints/linux.500 index fc9192516..c786f4f62 100755 --- a/sys/unix/hints/linux.500 +++ b/sys/unix/hints/linux.500 @@ -77,7 +77,8 @@ USE_NOSTATICFN = 1 #QT6 prior to compiler include ifdef WANT_WIN_QT6 CPLUSPLUS_NEED20=1 -ADDITIONAL_NO_WARN=-Wno-sfinae-incomplete +ADDITIONAL_NO_WARN_GPPCCX=-Wno-sfinae-incomplete +ADDITIONAL_NO_WARN_CLANGCCX=-Wno-c++26-extensions endif # WANT_WIN_QT6 # compiler.500 contains compiler detection and adjustments common