aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-04-22 16:24:35 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-04-22 16:24:43 +0200
commitbbe53f61db73237b8334207d696d99a4cf16a760 (patch)
treea6be54d8bcf25498be3db50aa2985508c7910c50 /configure.ac
parent91c601c54a097e467204285a728006a2b3c78eec (diff)
parent05c20a553a12d03b1512a75973674c6d25534259 (diff)
Merge pull request #4042
05c20a5 build: add symbol for upcoming gcc 4.9's libstdc++ (Cory Fields) 49a3352 gitian-linux: --enable-glibc-back-compat (Warren Togami) d5aab70 build: add an option for enabling glibc back-compat (Cory Fields) ffc6b67 build: add glibc/libstdc++ back-compat stubs (Cory Fields)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 45cd023bb1..3e508571e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,6 +108,12 @@ AC_ARG_ENABLE([lcov],
[use_lcov=yes],
[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], [])
@@ -319,6 +325,21 @@ fi
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
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"])
@@ -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_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([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])