]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
m4: Change LIBS order of TOR_SEARCH_LIBRARY()
authorDavid Goulet <dgoulet@torproject.org>
Wed, 13 Jan 2021 14:48:45 +0000 (09:48 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 13 Jan 2021 14:52:10 +0000 (09:52 -0500)
Some gcc versions do explode if the order of the linker flags are not correct.
One issue was statically building OpenSSL which would require that "-lssl
-lcrypto" be put _before_ the "-lpthread -ldl" flags.

I have not such problem with GCC 10 but does with GCC 9.

Closes #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
acinclude.m4
changes/ticket33624 [new file with mode: 0644]

index 5ecdf1d5c2d7948af4d65450bb8012b84f20438e..e6389ea1d4e70a71926b0652e22c6c0f10591869 100644 (file)
@@ -166,7 +166,7 @@ AC_CACHE_CHECK([for $1 directory], tor_cv_library_$1_dir, [
 
   for tor_trydir in "$try$1dir" "(system)" "$prefix" /usr/local /usr/pkg $8; do
     LDFLAGS="$tor_saved_LDFLAGS"
-    LIBS="$tor_saved_LIBS $3"
+    LIBS="$3 $tor_saved_LIBS"
     CPPFLAGS="$tor_saved_CPPFLAGS"
 
     if test -z "$tor_trydir" ; then
@@ -219,7 +219,7 @@ AC_CACHE_CHECK([for $1 directory], tor_cv_library_$1_dir, [
   CPPFLAGS="$tor_saved_CPPFLAGS"
 ]) dnl end cache check
 
-LIBS="$LIBS $3"
+LIBS="$3 $LIBS"
 if test "$tor_cv_library_$1_dir" != "(system)"; then
    TOR_EXTEND_CODEPATH($tor_cv_library_$1_dir)
 fi
diff --git a/changes/ticket33624 b/changes/ticket33624
new file mode 100644 (file)
index 0000000..eded3b4
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes (configure, static build):
+    - Change our search library configure macro linker flag order so it works
+      for certain compilers that need the right order. Fixes bug 33624; bugfix
+      on 0.1.1.0-alpha.
+