99_ltmain_as-needed.patch 806 B

12345678910111213141516171819202122232425262728293031
  1. --- ltmain.sh.old 2007-10-09 07:38:25.000000000 +0200
  2. +++ ltmain.sh 2007-10-09 07:39:25.000000000 +0200
  3. @@ -1794,6 +1794,11 @@
  4. arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
  5. ;;
  6. + -Wl,--as-needed)
  7. + deplibs="$deplibs $arg"
  8. + continue
  9. + ;;
  10. +
  11. -Wl,*)
  12. args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
  13. arg=
  14. @@ -2137,6 +2142,15 @@
  15. lib=
  16. found=no
  17. case $deplib in
  18. + -Wl,--as-needed)
  19. + if test "$linkmode,$pass" = "prog,link"; then
  20. + compile_deplibs="$deplib $compile_deplibs"
  21. + finalize_deplibs="$deplib $finalize_deplibs"
  22. + else
  23. + deplibs="$deplib $deplibs"
  24. + fi
  25. + continue
  26. + ;;
  27. -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
  28. if test "$linkmode,$pass" = "prog,link"; then
  29. compile_deplibs="$deplib $compile_deplibs"