From c6b2b66decc5e53782a57aa035d9c9fc5e6638ac Mon Sep 17 00:00:00 2001 From: dr7ana Date: Tue, 4 Jun 2024 07:45:29 -0700 Subject: [PATCH] GCC stringop bugfix - FMT will trigger a gcc bug on stringop-overflow with gcc versions 11 and earlier - FMT issue fmtlib/fmt#2442 - FMT issue fmtlib/fmt#2708 - GCC bug tracker https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101854 - Confirming it still appears on gcc-11 https://godbolt.org/z/d15q4Exvz --- CMakeLists.txt | 9 +++++++-- external/oxen-encoding | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f574dde5..3923d462 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,8 +112,13 @@ if (WARNINGS_AS_ERRORS) endif() add_library(libquic_internal-warnings INTERFACE) -if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.0) - target_compile_options(libquic_internal-warnings INTERFACE -fconcepts) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.0) + target_compile_options(libquic_internal-warnings INTERFACE -fconcepts) + endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0.0) + list(APPEND warning_flags -Wno-error=stringop-overflow) # gcc 11 and earlier bug + endif() endif() target_compile_options(libquic_internal-warnings INTERFACE "$<$,$>:${warning_flags}>") diff --git a/external/oxen-encoding b/external/oxen-encoding index 0b40c14e..201c4ca8 160000 --- a/external/oxen-encoding +++ b/external/oxen-encoding @@ -1 +1 @@ -Subproject commit 0b40c14e6c8a7e3f79ab14d6fa3486d8c071a41b +Subproject commit 201c4ca86add82eaedf424c5f7c8fb756aa4fc17