summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2010-01-20 14:29:46 +0000
committerjoerg <joerg@pkgsrc.org>2010-01-20 14:29:46 +0000
commit40b0bb6d97553d4690dda7d7744303f869a2e304 (patch)
tree0681d4f74dc834724d18c0181e20a086b347f613 /mk/buildlink3
parent9a5319516de0fc955dc58d0b6dc7f80518aa7261 (diff)
downloadpkgsrc-40b0bb6d97553d4690dda7d7744303f869a2e304.tar.gz
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.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r--mk/buildlink3/scan-libtool12
1 files changed, 8 insertions, 4 deletions
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
######################################################################