diff options
author | jlam <jlam@pkgsrc.org> | 2005-02-14 21:33:36 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-02-14 21:33:36 +0000 |
commit | b0f18115067e08c23a4b96d2be2a208aec81712a (patch) | |
tree | 91cce1f40e3275fa1ba3fc0aa01f634e35b6d451 /mk | |
parent | a47d1821ae6530bffccadea87eb807c245f145af (diff) | |
download | pkgsrc-b0f18115067e08c23a4b96d2be2a208aec81712a.tar.gz |
Move some Darwin-specific code from arg-pp-main into arg-pp-darwin-gcc.
Diffstat (limited to 'mk')
-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". ###################################################################### |