diff options
author | jlam <jlam> | 2005-02-14 21:33:36 +0000 |
---|---|---|
committer | jlam <jlam> | 2005-02-14 21:33:36 +0000 |
commit | e8a34cda6098c481ff834209301eeb728a34e3c1 (patch) | |
tree | 91cce1f40e3275fa1ba3fc0aa01f634e35b6d451 /mk/wrapper | |
parent | 38164317f836361a0da6d942554ef94672ef3524 (diff) | |
download | pkgsrc-e8a34cda6098c481ff834209301eeb728a34e3c1.tar.gz |
Move some Darwin-specific code from arg-pp-main into arg-pp-darwin-gcc.
Diffstat (limited to 'mk/wrapper')
-rw-r--r-- | mk/wrapper/arg-pp-darwin-gcc | 23 | ||||
-rw-r--r-- | mk/wrapper/arg-pp-main | 19 |
2 files changed, 23 insertions, 19 deletions
diff --git a/mk/wrapper/arg-pp-darwin-gcc b/mk/wrapper/arg-pp-darwin-gcc index bfa86ea0bf2..9440c7c4200 100644 --- a/mk/wrapper/arg-pp-darwin-gcc +++ b/mk/wrapper/arg-pp-darwin-gcc @@ -1,4 +1,4 @@ -# $NetBSD: arg-pp-darwin-gcc,v 1.1 2005/01/18 17:25:13 jlam Exp $ +# $NetBSD: arg-pp-darwin-gcc,v 1.2 2005/02/14 21:33:36 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,6 +36,27 @@ case $arg in ###################################################################### +# Split direct paths to Darwin "dylib" shared libraries into the +# "-Ldir -llib" equivalent. +###################################################################### +/*/lib*.dylib) + dir="${arg%/lib*.dylib}" + lib="${arg#$dir/lib}" + case $lib in + */*) argok=yes; argmatch=yes ;; + *.dylib) lib="${lib%.dylib}" ;; + esac + case $argmatch in + yes) ;; + *) prepend_queue argbuf "-l$lib" + $debug_log $wrapperlog " (arg-pp-darwin-gcc) pre: -l$lib" + prepend_queue argbuf "-L$dir" + $debug_log $wrapperlog " (arg-pp-darwin-gcc) pre: -L$dir" + argmatch=yes + ;; + esac + ;; +###################################################################### # Darwin's linker uses: # # -dylib_file /path/shlib:/path2/shlib diff --git a/mk/wrapper/arg-pp-main b/mk/wrapper/arg-pp-main index 47e89d508e4..45766a56de9 100644 --- a/mk/wrapper/arg-pp-main +++ b/mk/wrapper/arg-pp-main @@ -1,4 +1,4 @@ -# $NetBSD: arg-pp-main,v 1.3 2005/01/26 05:03:11 jlam Exp $ +# $NetBSD: arg-pp-main,v 1.4 2005/02/14 21:33:36 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -75,23 +75,6 @@ case $arg in ;; esac ;; -/*/lib*.dylib) # Darwin - dir="${arg%/lib*.dylib}" - lib="${arg#$dir/lib}" - case $lib in - */*) argok=yes; argmatch=yes ;; - *.dylib) lib="${lib%.dylib}" ;; - esac - 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". ###################################################################### |