summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjlam <jlam>2005-08-05 19:46:41 +0000
committerjlam <jlam>2005-08-05 19:46:41 +0000
commit3cae3f7cb6069a5c199cd02db20161b0fa5f26ae (patch)
treee842f8c3d1bac6ec9e9562b51fc56ff7e2a3f493 /mk/buildlink3
parent53c7dbd6a2345f9594fc3dc5d0f14e2ecd652e08 (diff)
downloadpkgsrc-3cae3f7cb6069a5c199cd02db20161b0fa5f26ae.tar.gz
Hardcode a workaround for perl's DynaLoader.a which is definitely a
PIC code archive, but libtool isn't smart enough to realize it. Munge the name within cmd-sink-libtool into something that will make libtool recognize it as a PIC code archive. We unmunge it in arg-pp-main so non-libtool wrappers see the right thing. This let's us use libtool to link applications with an embedded Perl interpreter. I feel so dirty...
Diffstat (limited to 'mk/buildlink3')
-rw-r--r--mk/buildlink3/cmd-sink-libtool15
1 files changed, 14 insertions, 1 deletions
diff --git a/mk/buildlink3/cmd-sink-libtool b/mk/buildlink3/cmd-sink-libtool
index 44311d935d0..75599527020 100644
--- a/mk/buildlink3/cmd-sink-libtool
+++ b/mk/buildlink3/cmd-sink-libtool
@@ -1,4 +1,4 @@
-# $NetBSD: cmd-sink-libtool,v 1.1 2004/09/21 15:01:40 jlam Exp $
+# $NetBSD: cmd-sink-libtool,v 1.2 2005/08/05 19:46:41 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -40,6 +40,19 @@ while ! queue_is_empty cmdbuf; do
$debug_log $wrapperlog " (cmd-sink-libtool) pop: $arg"
case $arg in
##############################################################
+ # Hardcode a workaround for perl's DynaLoader.a which is
+ # definitely a PIC code archive, but libtool isn't smart
+ # enough to realize it. Munge the name into something that
+ # will make libtool recognize it as a PIC code archive. We
+ # unmunge it in arg-pp-main so non-libtool wrappers see the
+ # right thing.
+ ##############################################################
+ */DynaLoader.a)
+ arg="${arg%/DynaLoader.a}/libDynaLoader_pic.a"
+ $debug_log $wrapperlog " (cmd-sink-libtool) to: $arg"
+ . $buildcmd
+ ;;
+ ##############################################################
# If we're in "compile" mode, then don't add any linker options
# to the command line.
##############################################################