build: add an option for enabling glibc back-compat
Using "./configure --enable-glibc-back-compat" will attempt to be compatible with a target running glibc abi 2.9 and libstdc++ abi 3.4.
This commit is contained in:
parent
ffc6b678b9
commit
d5aab70490
22
configure.ac
22
configure.ac
@ -108,6 +108,12 @@ AC_ARG_ENABLE([lcov],
|
|||||||
[use_lcov=yes],
|
[use_lcov=yes],
|
||||||
[use_lcov=no])
|
[use_lcov=no])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([glibc-back-compat],
|
||||||
|
[AS_HELP_STRING([--enable-glibc-back-compat],
|
||||||
|
[enable backwards compatibility with glibc and libstdc++])],
|
||||||
|
[use_glibc_compat=$enableval],
|
||||||
|
[use_glibc_compat=no])
|
||||||
|
|
||||||
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
|
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
|
||||||
|
|
||||||
|
|
||||||
@ -319,6 +325,21 @@ fi
|
|||||||
|
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
|
AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
|
||||||
|
|
||||||
|
if test x$use_glibc_compat != xno; then
|
||||||
|
|
||||||
|
#__fdelt_chk's params and return type have changed from long unsigned int to long int.
|
||||||
|
# See which one is present here.
|
||||||
|
AC_MSG_CHECKING(__fdelt_chk type)
|
||||||
|
AC_TRY_COMPILE([#define __USE_FORTIFY_LEVEL 2
|
||||||
|
#include <sys/select.h>
|
||||||
|
extern "C" long unsigned int __fdelt_warn(long unsigned int);],[],
|
||||||
|
[ fdelt_type="long unsigned int"],
|
||||||
|
[ fdelt_type="long int"])
|
||||||
|
AC_MSG_RESULT($fdelt_type)
|
||||||
|
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
if test x$use_hardening != xno; then
|
if test x$use_hardening != xno; then
|
||||||
AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
|
AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
|
||||||
AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
|
AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
|
||||||
@ -691,6 +712,7 @@ AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
|
|||||||
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
|
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
|
||||||
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
|
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
|
||||||
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
|
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
|
||||||
|
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
|
||||||
|
|
||||||
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
|
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
|
||||||
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
|
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
|
||||||
|
@ -135,6 +135,11 @@ libbitcoin_common_a_SOURCES = \
|
|||||||
version.cpp \
|
version.cpp \
|
||||||
$(BITCOIN_CORE_H)
|
$(BITCOIN_CORE_H)
|
||||||
|
|
||||||
|
if GLIBC_BACK_COMPAT
|
||||||
|
libbitcoin_common_a_SOURCES += compat/glibc_compat.cpp
|
||||||
|
libbitcoin_common_a_SOURCES += compat/glibcxx_compat.cpp
|
||||||
|
endif
|
||||||
|
|
||||||
libbitcoin_cli_a_SOURCES = \
|
libbitcoin_cli_a_SOURCES = \
|
||||||
rpcclient.cpp \
|
rpcclient.cpp \
|
||||||
$(BITCOIN_CORE_H)
|
$(BITCOIN_CORE_H)
|
||||||
|
Loading…
Reference in New Issue
Block a user