Ticket #27802: 0001-TOR_SEARCH_LIBRARY-Prepend-library-to-LIBS-instead-o.patch

File 0001-TOR_SEARCH_LIBRARY-Prepend-library-to-LIBS-instead-o.patch, 1.2 KB (added by str4d, 5 months ago)
  • acinclude.m4

    From 90bb6450ea60596d6143a8e5673b7dd1b3c7d69c Mon Sep 17 00:00:00 2001
    From: Jack Grigg <thestr4d@gmail.com>
    Date: Wed, 2 Oct 2019 06:54:42 -0600
    Subject: [PATCH] TOR_SEARCH_LIBRARY: Prepend library to LIBS instead of
     appending
    
    This matches the behaviour of AC_SEARCH_LIBS, and ensures that libraries
    depending on previously-discovered libraries will correctly resolve
    symbols.
    
    Closes #27802.
    ---
     acinclude.m4 | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/acinclude.m4 b/acinclude.m4
    index 5ecdf1d5c..e6389ea1d 100644
    a b AC_CACHE_CHECK([for $1 directory], tor_cv_library_$1_dir, [ 
    166166
    167167  for tor_trydir in "$try$1dir" "(system)" "$prefix" /usr/local /usr/pkg $8; do
    168168    LDFLAGS="$tor_saved_LDFLAGS"
    169     LIBS="$tor_saved_LIBS $3"
     169    LIBS="$3 $tor_saved_LIBS"
    170170    CPPFLAGS="$tor_saved_CPPFLAGS"
    171171
    172172    if test -z "$tor_trydir" ; then
    AC_CACHE_CHECK([for $1 directory], tor_cv_library_$1_dir, [ 
    219219  CPPFLAGS="$tor_saved_CPPFLAGS"
    220220]) dnl end cache check
    221221
    222 LIBS="$LIBS $3"
     222LIBS="$3 $LIBS"
    223223if test "$tor_cv_library_$1_dir" != "(system)"; then
    224224   TOR_EXTEND_CODEPATH($tor_cv_library_$1_dir)
    225225fi