From 29055be6b700e3150f967bffb4010e7f1e8837c9 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 26 Nov 2003 12:52:30 +0000 Subject: Do as buildlink2 and _append_ extra flags instead of prepending them. Prepending caused everything in ${BUILDLINK_DIR} to be found first, which was bad when you built something like MesaLib where the X11R6 headers conflict with the ones provided in the source. --- mk/buildlink3/libtool.sh | 6 +++--- mk/buildlink3/wrapper.sh | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'mk') diff --git a/mk/buildlink3/libtool.sh b/mk/buildlink3/libtool.sh index 2231c5087f0..6641672dc2b 100644 --- a/mk/buildlink3/libtool.sh +++ b/mk/buildlink3/libtool.sh @@ -1,6 +1,6 @@ #!@BUILDLINK_SHELL@ # -# $NetBSD: libtool.sh,v 1.8 2003/11/25 14:43:23 jlam Exp $ +# $NetBSD: libtool.sh,v 1.9 2003/11/26 12:52:30 jlam Exp $ Xsed='@SED@ -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' @@ -40,6 +40,7 @@ WRKSRC="@WRKSRC@" # Argument buffers buf1=; buf2=; buf3=; buf4=; buf5= +# Discover the libtool mode by examining the argument list. mode=link prevopt= nonopt= @@ -121,8 +122,7 @@ install) *cc|*++|gcc*|*-gcc*|*CC) case $mode in link) - cmd="$cmd $arg" - arg="@_BLNK_WRAP_EXTRA_FLAGS@" + set -- "$@" @_BLNK_WRAP_EXTRA_FLAGS@ ;; esac ;; diff --git a/mk/buildlink3/wrapper.sh b/mk/buildlink3/wrapper.sh index dc2d395cb60..3937ca5112d 100644 --- a/mk/buildlink3/wrapper.sh +++ b/mk/buildlink3/wrapper.sh @@ -1,6 +1,6 @@ #!@BUILDLINK_SHELL@ # -# $NetBSD: wrapper.sh,v 1.5 2003/10/09 12:15:15 jlam Exp $ +# $NetBSD: wrapper.sh,v 1.6 2003/11/26 12:52:30 jlam Exp $ Xsed='@SED@ -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' @@ -37,7 +37,8 @@ WRKSRC="@WRKSRC@" # Argument buffers buf1=; buf2=; buf3=; buf4=; buf5= -cmd="@WRAPPEE@ @_BLNK_WRAP_EXTRA_FLAGS@" +cmd="@WRAPPEE@" +set -- "$@" @_BLNK_WRAP_EXTRA_FLAGS@ while $test $# -gt 0 -o -n "${buf1}${buf2}${buf3}${buf4}${buf5}"; do cachehit=no skipcache=no -- cgit v1.2.3