Skip to content

Commit 69f9093

Browse files
Merge #6950: build: fix some errors when building on macOS w/o depends
6decd41 chore: limit changes to boost/gmp (PastaPastaPasta) 2834aec fix: improve libbacktrace detection (PastaPastaPasta) 8d77450 build: fix some errors when building on macOS w/o depends (pasta) Pull request description: ## Issue being fixed or feature implemented Properly detect gmp, backtrace, etc ## What was done? See commit ## How Has This Been Tested? Builds on macOS ## Breaking Changes _Please describe any breaking changes your code introduces_ ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: kwvg: utACK 6decd41 UdjinM6: utACK 6decd41 Tree-SHA512: 62bb9d64ed2369c97999213be8b4f274ea4f432acc6ac25fb77fd2be17dee66f271442791d4dab4e88cc9666019c383fc93d09c98deb5df51fe11543745bcb75
2 parents 467519b + 6decd41 commit 69f9093

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

configure.ac

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -892,11 +892,17 @@ case $host in
892892
export PKG_CONFIG_PATH="$($BREW --prefix qt@5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
893893
fi
894894

895-
gmp_prefix=$($BREW --prefix gmp 2>/dev/null)
896-
if test "$gmp_prefix" != ""; then
897-
CORE_CPPFLAGS="$CORE_CPPFLAGS -I$gmp_prefix/include"
898-
CORE_LDFLAGS="$CORE_LDFLAGS -L$gmp_prefix/lib"
899-
fi
895+
gmp_prefix=$($BREW --prefix gmp 2>/dev/null)
896+
if test "$gmp_prefix" != ""; then
897+
if test "$suppress_external_warnings" != "no"; then
898+
GMP_CPPFLAGS="-isystem $gmp_prefix/include"
899+
else
900+
GMP_CPPFLAGS="-I$gmp_prefix/include"
901+
fi
902+
GMP_LDFLAGS="-L$gmp_prefix/lib"
903+
CORE_CPPFLAGS="$CORE_CPPFLAGS $GMP_CPPFLAGS"
904+
CORE_LDFLAGS="$CORE_LDFLAGS $GMP_LDFLAGS"
905+
fi
900906

901907
case $host in
902908
*aarch64*)
@@ -1669,8 +1675,14 @@ if test "$use_zmq" = "yes"; then
16691675
fi
16701676

16711677
dnl check if libgmp is present
1678+
TEMP_CPPFLAGS="$CPPFLAGS"
1679+
TEMP_LDFLAGS="$LDFLAGS"
1680+
CPPFLAGS="$CPPFLAGS $GMP_CPPFLAGS"
1681+
LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
16721682
AC_CHECK_HEADER([gmp.h],, AC_MSG_ERROR(libgmp headers missing))
16731683
AC_CHECK_LIB([gmp], [__gmpz_init],GMP_LIBS=-lgmp, AC_MSG_ERROR(libgmp missing))
1684+
CPPFLAGS="$TEMP_CPPFLAGS"
1685+
LDFLAGS="$TEMP_LDFLAGS"
16741686

16751687
AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
16761688

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ libbitcoin_consensus_a_SOURCES = \
892892
version.h
893893

894894
# common: shared between dashd, and dash-qt and non-server tools
895-
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
895+
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS)
896896
libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
897897
libbitcoin_common_a_SOURCES = \
898898
base58.cpp \

0 commit comments

Comments
 (0)