]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
m4/libtool.m4: FreeBSD elftoolchain strip support
authorPavel Raiskup <praiskup@redhat.com>
Mon, 30 Nov 2015 07:37:18 +0000 (08:37 +0100)
committerPavel Raiskup <praiskup@redhat.com>
Fri, 19 Feb 2016 09:21:15 +0000 (10:21 +0100)
References:
http://savannah.gnu.org/patch/?8675
Message-Id: <20150523-002056.sv85487.59958@savannah.gnu.org>

* m4/libtool.m4 (_LT_CMD_STRIPLIB): Remove the redundant tests for
empty $old_striplib and $striplib.  Move the test for empty $STRIP
variable up. Allow elftoolchain strip (with the same arguments we
used to have with GNU strip) on FreeBSD.

NO-THANKS
m4/libtool.m4

index 6b83e603f566be816ee500807db86143ae2cda96..5aba7c89ac40da6fc572f61ddd1308a3099a1bfd 100644 (file)
--- a/NO-THANKS
+++ b/NO-THANKS
@@ -37,6 +37,7 @@ Bruno Haible                  haible@ilog.fr
 Dalibor Topic                  robilad@kaffe.org
 David Edelsohn                 edelsohn@gnu.org
 DJ Delorie                     dj@delorie.com
+Ed Maste                       emaste@freebsd.org
 Erez Zadok                     ezk@cs.columbia.edu
 Eric Blake                     ebb9@byu.net
 H.J. Lu                                hjl@gnu.org
@@ -143,5 +144,6 @@ Ulrich Drepper                      drepper@ipd.info.uni-karlsruhe.de
 Václav Zeman                  vhaisman@gmail.com
 Warren Dodge                   warren.l.dodge@Tektronix.com
 Xavier Pianet                  xavier@xingo.com
+Xin Li
 Юрий Андреевич Пухальский       pooh@cryptopro.ru
 Дилян Палаузов                    dilyan.palauzov@aegee.org
index 53b404f51159069089b9de06a193f32b4d4a023c..1a5f65bc3154418fc5aa9db960565de22009b3a5 100644 (file)
@@ -2220,26 +2220,35 @@ m4_defun([_LT_CMD_STRIPLIB],
 striplib=
 old_striplib=
 AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
+if test -z "$STRIP"; then
+  AC_MSG_RESULT([no])
 else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP"; then
+  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+    old_striplib="$STRIP --strip-debug"
+    striplib="$STRIP --strip-unneeded"
+    AC_MSG_RESULT([yes])
+  else
+    case $host_os in
+    darwin*)
+      # FIXME - insert some real tests, host_os isn't really good enough
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
-    else
+      ;;
+    freebsd*)
+      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+        old_striplib="$STRIP --strip-debug"
+        striplib="$STRIP --strip-unneeded"
+        AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+      fi
+      ;;
+    *)
       AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
+      ;;
+    esac
+  fi
 fi
 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 _LT_DECL([], [striplib], [1])