From 4302b4f3c4e66856686cdc0f2714dd16bab3b642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 31 Jul 2019 16:05:02 +0200 Subject: [PATCH 1/2] Revert the target specific variable to fix building with BSD make --- lib/dns/tests/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dns/tests/Makefile.in b/lib/dns/tests/Makefile.in index 98dc651285..afa7ff5534 100644 --- a/lib/dns/tests/Makefile.in +++ b/lib/dns/tests/Makefile.in @@ -234,12 +234,13 @@ time_test@EXEEXT@: time_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${LDFLAGS} -o $@ time_test.@O@ dnstest.@O@ \ ${DNSLIBS} ${ISCLIBS} ${LIBS} -tkey_test@EXEEXT@: WRAP_OPTIONS = \ +WRAP_OPTIONS = \ -Wl,--wrap=isc__mem_put \ -Wl,--wrap=isc__mem_get \ -Wl,--wrap=isc_mem_attach \ -Wl,--wrap=isc_mem_detach \ -Wl,--wrap=isc__mem_putanddetach + tkey_test@EXEEXT@: tkey_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} if test "${LD_WRAP_TESTS}" = true; then WRAP="${WRAP_OPTIONS}"; fi; \ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ From 37cccbab8d267500ac7d2b19f7940f64142e1d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 31 Jul 2019 16:09:43 +0200 Subject: [PATCH 2/2] Fix the ${WRAP} -> $${WRAP} to allow static non-libtool linking again --- configure | 15 +++++---------- configure.ac | 28 +++++++++++++--------------- lib/dns/tests/Makefile.in | 2 +- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/configure b/configure index 02160bb037..d336f6aa24 100755 --- a/configure +++ b/configure @@ -21467,7 +21467,6 @@ fi LD_WRAP_TESTS=false { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker support for --wrap option" >&5 $as_echo_n "checking for linker support for --wrap option... " >&6; } -if test "$use_libtool" = yes; then : CCASFLAGS_wrap_ax_save_flags=$CCASFLAGS @@ -21538,12 +21537,12 @@ if test "$use_libtool" = yes; then : - LDFLAGS="-Wl,-wrap,exit" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LDFLAGS="-Wl,-wrap,exit" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - void __real_exit (int status); - void __wrap_exit (int status) { __real_exit (status); } + void __real_exit (int status); + void __wrap_exit (int status) { __real_exit (status); } int main () @@ -21558,7 +21557,7 @@ if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define LD_WRAP 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -21619,10 +21618,6 @@ rm -f core conftest.err conftest.$ac_objext \ -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, libtool required" >&5 -$as_echo "no, libtool required" >&6; } -fi diff --git a/configure.ac b/configure.ac index 2a0b3ae973..90aafae8d0 100644 --- a/configure.ac +++ b/configure.ac @@ -2143,21 +2143,19 @@ AC_SUBST([KYUA]) LD_WRAP_TESTS=false AC_MSG_CHECKING([for linker support for --wrap option]) -AS_IF([test "$use_libtool" = yes], - [AX_SAVE_FLAGS([wrap]) - LDFLAGS="-Wl,-wrap,exit" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include - void __real_exit (int status); - void __wrap_exit (int status) { __real_exit (status); } - ]], - [[exit (1);]])], - [LD_WRAP_TESTS=true - AC_DEFINE([LD_WRAP], [1], [define if the linker supports --wrap option]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - AX_RESTORE_FLAGS([wrap])], - [AC_MSG_RESULT([no, libtool required])]) +AX_SAVE_FLAGS([wrap]) +LDFLAGS="-Wl,-wrap,exit" +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include + void __real_exit (int status); + void __wrap_exit (int status) { __real_exit (status); } + ]], + [[exit (1);]])], + [LD_WRAP_TESTS=true + AC_DEFINE([LD_WRAP], [1], [define if the linker supports --wrap option]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) +AX_RESTORE_FLAGS([wrap]) AC_SUBST([LD_WRAP_TESTS]) diff --git a/lib/dns/tests/Makefile.in b/lib/dns/tests/Makefile.in index afa7ff5534..4eb452d36c 100644 --- a/lib/dns/tests/Makefile.in +++ b/lib/dns/tests/Makefile.in @@ -244,7 +244,7 @@ WRAP_OPTIONS = \ tkey_test@EXEEXT@: tkey_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} if test "${LD_WRAP_TESTS}" = true; then WRAP="${WRAP_OPTIONS}"; fi; \ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} ${WRAP} -o $@ tkey_test.@O@ \ + ${LDFLAGS} $${WRAP} -o $@ tkey_test.@O@ \ ${DNSLIBS} ${ISCLIBS} ${LIBS} tsig_test@EXEEXT@: tsig_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}