summaryrefslogtreecommitdiff
path: root/lang/parrot/patches/patch-af
blob: 3f5a098ad332bf996ebf05cade81f14c253f132f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-af,v 1.3.2.2 2009/10/22 14:51:26 tron Exp $

Enable shared libraries on NetBSD.

--- config/init/hints/netbsd.pm	(revision 41959)
+++ config/init/hints/netbsd.pm	(working copy)
@@ -9,6 +9,9 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
+    my $share_ext = $conf->option_or_data('share_ext');
+    my $version   = $conf->option_or_data('VERSION');
+
     my $ccflags = $conf->data->get('ccflags');
     if ( $ccflags !~ /-pthread\b/ ) {
         $ccflags .= ' -pthread';
@@ -19,7 +22,16 @@
     if ( $libs !~ /-lpthread\b/ ) {
         $libs .= ' -lpthread';
     }
-    $conf->data->set( libs => $libs );
+    $conf->data->set(
+	libs => $libs,
+	rpath => '-Wl,-R',
+
+	has_dynamic_linking    => 1,
+	parrot_is_shared       => 1,
+	libparrot_shared       => "libparrot$share_ext.$version",
+	libparrot_shared_alias => "libparrot$share_ext",
+	libparrot_soname       => "-Wl,-soname=libparrot$share_ext.$version",
+    );
 }
 
 1;