[git] GPG-ERROR - branch, master, updated. gpgrt-1.33-9-g1fd9972

by NIIBE Yutaka cvs at cvs.gnupg.org
Thu Jan 10 02:31:39 CET 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  1fd997231b717853822dff9d3e981d95765f323d (commit)
       via  1044ee639dab7260da481250cd2a46a69ab2b5d3 (commit)
      from  07e8c2e9ed04bb48fa380d8d23d3a7a7353e5878 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1fd997231b717853822dff9d3e981d95765f323d
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Jan 8 10:21:44 2019 +0900

    build: Build with LD_LIBRARY_PATH, use of DT_RPATH (2/2).
    
    * configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags.
    * tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE.
    (t_lock_LDADD, t_poll_LDADD): Use LDADD.
    
    --
    
    GnuPG-bug-id: 4298
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/configure.ac b/configure.ac
index 8f1598e..400f99e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,7 +82,7 @@ AC_PROG_AWK
 AC_CHECK_TOOL(AR, ar, :)
 AC_GNU_SOURCE
 
-# Taken from mpfr-4.0.1
+# Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE
 dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH
 dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has
 dnl the precedence over the run path, so that if a compatible MPFR library
@@ -101,18 +101,21 @@ case $host in
   *-*-linux*)
     if test -n "$LD_LIBRARY_PATH"; then
       saved_LDFLAGS="$LDFLAGS"
-      LDFLAGS="$LDFLAGS -Wl,--disable-new-dtags"
+      LDADD_FOR_TESTS_KLUDGE="-Wl,--disable-new-dtags"
+      LDFLAGS="$LDFLAGS $LDADD_FOR_TESTS_KLUDGE"
       AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker)
       AC_LINK_IFELSE([AC_LANG_SOURCE([[
 int main (void) { return 0; }
       ]])],
       [AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))],
       [AC_MSG_RESULT(no)
-       LDFLAGS="$saved_LDFLAGS"
+       LDADD_FOR_TESTS_KLUDGE=""
       ])
+      LDFLAGS="$saved_LDFLAGS"
     fi
     ;;
 esac
+AC_SUBST([LDADD_FOR_TESTS_KLUDGE])
 
 # Set some variables depending on the platform for later use.
 have_w32_system=no
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 71ca3a4..ea02da1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,10 +33,10 @@ TESTS = t-version t-strerror t-syserror t-lock t-printf t-poll t-b64 \
 AM_CPPFLAGS = -I$(top_builddir)/src $(extra_includes)
 
 AM_LDFLAGS = -no-install
-LDADD = $(gpg_error_lib)
+LDADD = $(gpg_error_lib) @LDADD_FOR_TESTS_KLUDGE@
 
 noinst_PROGRAMS = $(TESTS)
 noinst_HEADERS = t-common.h
 
-t_lock_LDADD = $(gpg_error_lib) $(LIBMULTITHREAD)
-t_poll_LDADD = $(gpg_error_lib) $(LIBMULTITHREAD)
+t_lock_LDADD = $(LDADD) $(LIBMULTITHREAD)
+t_poll_LDADD = $(LDADD) $(LIBMULTITHREAD)

commit 1044ee639dab7260da481250cd2a46a69ab2b5d3
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Jan 8 10:05:25 2019 +0900

    build: Build with LD_LIBRARY_PATH, use of DT_RPATH (1/2).
    
    * configure.ac: Check against --disable-new-dtags.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/configure.ac b/configure.ac
index 4a99523..8f1598e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,38 @@ AC_PROG_AWK
 AC_CHECK_TOOL(AR, ar, :)
 AC_GNU_SOURCE
 
+# Taken from mpfr-4.0.1
+dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH
+dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has
+dnl the precedence over the run path, so that if a compatible MPFR library
+dnl is installed in some directory from $LD_LIBRARY_PATH, then the tested
+dnl MPFR library will be this library instead of the MPFR library from the
+dnl build tree. Other OS with the same issue might be added later.
+dnl
+dnl References:
+dnl   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732
+dnl   http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html
+dnl
+dnl We need to check whether --disable-new-dtags is supported as alternate
+dnl linkers may be used (e.g., with tcc: CC=tcc LD=tcc).
+dnl
+case $host in
+  *-*-linux*)
+    if test -n "$LD_LIBRARY_PATH"; then
+      saved_LDFLAGS="$LDFLAGS"
+      LDFLAGS="$LDFLAGS -Wl,--disable-new-dtags"
+      AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker)
+      AC_LINK_IFELSE([AC_LANG_SOURCE([[
+int main (void) { return 0; }
+      ]])],
+      [AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))],
+      [AC_MSG_RESULT(no)
+       LDFLAGS="$saved_LDFLAGS"
+      ])
+    fi
+    ;;
+esac
+
 # Set some variables depending on the platform for later use.
 have_w32_system=no
 have_w64_system=no

-----------------------------------------------------------------------

Summary of changes:
 configure.ac      | 35 +++++++++++++++++++++++++++++++++++
 tests/Makefile.am |  6 +++---
 2 files changed, 38 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list