]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: break all the way out when a good nm is found
authorPeter Rosin <peda@lysator.liu.se>
Sun, 28 Apr 2013 07:16:56 +0000 (09:16 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Sun, 28 Apr 2013 07:16:56 +0000 (09:16 +0200)
The current code tries to locate a compatible nm tool.  It starts with
a prefixed nm tool (great!) and includes a plain nm too (that's fine).
The problem is that the code searches for the prefixed nm before the
plain nm (normally fine), but doesn't break once it has found a valid
match, and the plain nm ends up the winner.

Report and analysis by Mike Frysinger.

* m4/libtool.m4 (LT_PATH_NM): Break all the way out on a good match.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
m4/libtool.m4

index 3f50b0cc0d68b7484cf8edea0140cb9e128e430d..d7013c53f1aaa6bcc119d0de5e5685945f38889e 100644 (file)
@@ -3397,13 +3397,13 @@ else
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
        */dev/null* | *'Invalid file or object type'*)
          lt_cv_path_NM="$tmp_nm -B"
-         break
+         break 2
          ;;
        *)
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
          */dev/null*)
            lt_cv_path_NM="$tmp_nm -p"
-           break
+           break 2
            ;;
          *)
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but