From 33b358b6778c843fcf7fe5e4a22a8a61dbabee6c Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 20 Jan 2010 14:29:46 +0000 Subject: Do not second guess the libtool mode if it was explicitly specified. For --mode=execute, it could result in incorrect dropping of arguments, which breaks mono. --- mk/buildlink3/scan-libtool | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mk/buildlink3') diff --git a/mk/buildlink3/scan-libtool b/mk/buildlink3/scan-libtool index 1623d7b66c9..17dd5c8c3d3 100644 --- a/mk/buildlink3/scan-libtool +++ b/mk/buildlink3/scan-libtool @@ -1,4 +1,4 @@ -# $NetBSD: scan-libtool,v 1.4 2006/12/15 13:15:06 martti Exp $ +# $NetBSD: scan-libtool,v 1.5 2010/01/20 14:29:46 joerg Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,7 +35,7 @@ # POSSIBILITY OF SUCH DAMAGE. # Discover the libtool mode by scanning the argument list. -lt_mode=link +lt_mode= prevopt= nonopt= lafile= @@ -69,14 +69,14 @@ for arg do lt_mode="$optarg" ;; -*) - if $test -n "$nonopt" -a "$lt_mode" != "install"; then + if $test -n "$nonopt" -a -z "$lt_mode"; then case $arg in -c) lt_mode=compile ;; esac fi ;; *) - if $test -z "$nonopt"; then + if $test -z "$nonopt" -a -z "$lt_mode"; then nonopt="$arg" case $nonopt in *cc|*++|gcc*|*-gcc*|xlc*|*CC) @@ -99,6 +99,10 @@ for arg do esac done +if $test -z "$lt_mode"; then + lt_mode=link +fi + $debug_log $wrapperlog " (scan-libtool) mode: $lt_mode" case $lt_mode in ###################################################################### -- cgit v1.2.3