From a2a889c638465a4a10561543197904f862fd9d21 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 26 Jan 2005 05:03:11 +0000 Subject: Fix so that we preserve /usr/lib/foo.so on the command line. --- mk/wrapper/arg-pp-main | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) (limited to 'mk/wrapper') diff --git a/mk/wrapper/arg-pp-main b/mk/wrapper/arg-pp-main index a03dc578be0..47e89d508e4 100644 --- a/mk/wrapper/arg-pp-main +++ b/mk/wrapper/arg-pp-main @@ -1,4 +1,4 @@ -# $NetBSD: arg-pp-main,v 1.2 2005/01/25 23:27:34 cube Exp $ +# $NetBSD: arg-pp-main,v 1.3 2005/01/26 05:03:11 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -47,11 +47,15 @@ case $arg in *.so) lib="${lib%.so}" ;; *.so.[0-9]*) lib="${lib%.so.[0-9]*}" ;; esac - prepend_queue argbuf "-l$lib" - $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" - prepend_queue argbuf "-L$dir" - $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" - argmatch=yes + case $argmatch in + yes) ;; + *) prepend_queue argbuf "-l$lib" + $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" + prepend_queue argbuf "-L$dir" + $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" + argmatch=yes + ;; + esac ;; /*/lib*.sl|/*/lib*.sl.[0-9]*) # HP-UX dir="${arg%/lib*}" @@ -61,11 +65,15 @@ case $arg in *.sl) lib="${lib%.sl}" ;; *.sl.[0-9]*) lib="${lib%.sl.[0-9]*}" ;; esac - prepend_queue argbuf "-l$lib" - $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" - prepend_queue argbuf "-L$dir" - $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" - argmatch=yes + case $argmatch in + yes) ;; + *) prepend_queue argbuf "-l$lib" + $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" + prepend_queue argbuf "-L$dir" + $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" + argmatch=yes + ;; + esac ;; /*/lib*.dylib) # Darwin dir="${arg%/lib*.dylib}" @@ -74,11 +82,15 @@ case $arg in */*) argok=yes; argmatch=yes ;; *.dylib) lib="${lib%.dylib}" ;; esac - prepend_queue argbuf "-l$lib" - $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" - prepend_queue argbuf "-L$dir" - $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" - argmatch=yes + case $argmatch in + yes) ;; + *) prepend_queue argbuf "-l$lib" + $debug_log $wrapperlog " (arg-pp-main) pre: -l$lib" + prepend_queue argbuf "-L$dir" + $debug_log $wrapperlog " (arg-pp-main) pre: -L$dir" + argmatch=yes + ;; + esac ;; ###################################################################### # Remove extraneous comma in "-Wl,-R,/dir" and in "-Wl,-L,/dir". -- cgit v1.2.3