dash/depends/packages/bdb.mk

35 lines
1.2 KiB
Makefile
Raw Normal View History

2014-12-31 17:49:12 +01:00
package=bdb
$(package)_version=4.8.30
$(package)_download_path=https://download.oracle.com/berkeley-db
2014-12-31 17:49:12 +01:00
$(package)_file_name=db-$($(package)_version).NC.tar.gz
$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
$(package)_build_subdir=build_unix
$(package)_patches=clang_cxx_11.patch
2014-12-31 17:49:12 +01:00
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication --enable-option-checking
2014-12-31 17:49:12 +01:00
$(package)_config_opts_mingw32=--enable-mingw
Merge bitcoin/bitcoin#27462: depends: fix compiling bdb with clang-16 on aarch64 f8b8458276983f8fc1e2a47c4d00c1e30633067d depends: fix compiling bdb with clang-16 on aarch64 (fanquake) Pull request description: Compiling bdb with clang-16 on aarch64 (hardware) currently fails: ```bash make -C depends/ bdb CC=clang CXX=clang++ ... checking for mutexes... UNIX/fcntl configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM. configure: error: Unable to find a mutex implementation ``` Looking at config.log we've got: ```bash configure:18704: checking for mutexes configure:18815: clang -o conftest -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security -I/bitcoin/depends/aarch64-unknown-linux-gnu/include -D_GNU_SOURCE -D_REENTRANT -L/bitcoin/depends/aarch64-unknown-linux-gnu/lib conftest.c -lpthread >&5 conftest.c:45:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] main() { ^ int conftest.c:50:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] exit ( ^ conftest.c:50:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning and 1 error generated. ``` Clang-16 changed `-Wimplicit-function-declaration` and `-Wimplicit-int` warnings into errors, see: https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes. > The -Wimplicit-function-declaration and -Wimplicit-int warnings now > default to an error in C99, C11, and C17. As of C2x, support for implicit > function declarations and implicit int has been removed, and the > warning options will have no effect. Specifying -Wimplicit-int in > C89 mode will now issue warnings instead of being a noop. ACKs for top commit: hebasto: ACK f8b8458276983f8fc1e2a47c4d00c1e30633067d, tested on Ubuntu Lunar (`aarch64`) with: Tree-SHA512: 5ca078b1c00915446e9f0f2ecaa4342295a2097996554345753315d1c81c23000c57be14e1ac5506a87820f5114aba748456f2c2b6426b0810504d62d761a787
2023-04-17 17:04:23 +02:00
$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int
$(package)_cxxflags+=-std=c++17
$(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 -D__BSD_VISIBLE=1
$(package)_cppflags_netbsd=-D_XOPEN_SOURCE=600
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
2014-12-31 17:49:12 +01:00
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/clang_cxx_11.patch && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist
2014-12-31 17:49:12 +01:00
endef
define $(package)_config_cmds
../dist/$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE) libdb_cxx-4.8.a libdb-4.8.a
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include
endef