summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-02-14 21:33:36 +0000
committerjlam <jlam@pkgsrc.org>2005-02-14 21:33:36 +0000
commit9a48aa99f1c2b58a61fec21c9b6daa67daccd9e9 (patch)
tree91cce1f40e3275fa1ba3fc0aa01f634e35b6d451 /mk/wrapper
parenta4719cbfa57ef22c4eaefa484b535289125cd685 (diff)
downloadpkgsrc-9a48aa99f1c2b58a61fec21c9b6daa67daccd9e9.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-gcc23
-rw-r--r--mk/wrapper/arg-pp-main19
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".
######################################################################