link-libopagent
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Sun, 12 Mar 2017 08:49:18 +0000 (08:49 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sun, 12 Mar 2017 08:49:18 +0000 (08:49 +0000)
===================================================================

Gbp-Pq: Name 0023-link-libopagent.patch

configure

index c94fb134485e32e32a00a88d8c1cfa1549f12bfd..6348619207fbc832788a020aae3b1383bcfae5b3 100755 (executable)
--- a/configure
+++ b/configure
@@ -10130,7 +10130,7 @@ if test "${with_oprofile+set}" = set; then
       case $llvm_cv_os_type in
         Linux)
           if test -n "$llvm_cv_oppath" ; then
-            LIBS="$LIBS -lopagent -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}"
+            #LIBS="$LIBS -lopagent -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}"
                                                             { echo "$as_me:$LINENO: checking for library containing bfd_init" >&5
 echo $ECHO_N "checking for library containing bfd_init... $ECHO_C" >&6; }
 if test "${ac_cv_search_bfd_init+set}" = set; then
@@ -10226,7 +10226,7 @@ fi
 echo "${ECHO_T}$ac_cv_search_bfd_init" >&6; }
 ac_res=$ac_cv_search_bfd_init
 if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  test "$ac_res" = "none required" || true
 
 fi
 
@@ -10262,8 +10262,8 @@ for ac_lib in '' opagent; do
   if test -z "$ac_lib"; then
     ac_res="none required"
   else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    ac_res="-Wl,--as-needed -l$ac_lib -Wl,--no-as-needed"
+    LIBS="-Wl,--as-needed -l$ac_lib -Wl,--no-as-needed $ac_func_search_save_LIBS"
   fi
   rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"