From 1f7552d236e7bff9de6870feaf08c437bf18d53f Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 20 Oct 2020 17:10:45 +0800 Subject: [PATCH 1/2] build: fix mutex detection when building bdb on macOS Starting with the Clang shipped with Xcode 12, Apple has enabled -Werror=implicit-function-declaration by default. This causes bdbs mutex detection to fail when building on macOS (not cross-compiling): checking for mutexes... UNIX/fcntl configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM. configure: error: Unable to find a mutex implementation as previously emitted warnings are being turned into errors. i.e: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] Append -Wno-error=implicit-function-declaration to cflags so that -Wimplicit-function-declaration returns to being a warning, and the configure checks will succeed. Fixes #19411. --- depends/packages/bdb.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index f983c754ab..8b52244e44 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -9,7 +9,8 @@ define $(package)_set_vars $(package)_config_opts=--disable-shared --enable-cxx --disable-replication $(package)_config_opts_mingw32=--enable-mingw $(package)_config_opts_linux=--with-pic -$(package)_cxxflags=-std=c++17 +$(package)_cflags+=-Wno-error=implicit-function-declaration +$(package)_cxxflags=-std=c++11 $(package)_cppflags_mingw32=-DUNICODE -D_UNICODE endef From 7752b57910decc2dc729fd39084b593c021f9faa Mon Sep 17 00:00:00 2001 From: jouzo Date: Tue, 5 Apr 2022 13:12:32 +0100 Subject: [PATCH 2/2] Use C++17 --- depends/packages/bdb.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index 8b52244e44..f56346c500 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -10,7 +10,7 @@ $(package)_config_opts=--disable-shared --enable-cxx --disable-replication $(package)_config_opts_mingw32=--enable-mingw $(package)_config_opts_linux=--with-pic $(package)_cflags+=-Wno-error=implicit-function-declaration -$(package)_cxxflags=-std=c++11 +$(package)_cxxflags=-std=c++17 $(package)_cppflags_mingw32=-DUNICODE -D_UNICODE endef