pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Do not second guess the libtool mode if ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ebfc238a96e9
branches:  trunk
changeset: 569871:ebfc238a96e9
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Jan 20 14:29:46 2010 +0000

description:
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:

 mk/buildlink3/scan-libtool |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 55348203a27d -r ebfc238a96e9 mk/buildlink3/scan-libtool
--- a/mk/buildlink3/scan-libtool        Wed Jan 20 14:27:55 2010 +0000
+++ b/mk/buildlink3/scan-libtool        Wed Jan 20 14:29:46 2010 +0000
@@ -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 @@
                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 @@
        esac
 done
 
+if $test -z "$lt_mode"; then
+       lt_mode=link
+fi
+
 $debug_log $wrapperlog "    (scan-libtool) mode: $lt_mode"
 case $lt_mode in
 ######################################################################



Home | Main Index | Thread Index | Old Index