-# $OpenBSD: Library.pm,v 1.10 2014/04/16 10:31:27 zhuk Exp $
+# $OpenBSD: Library.pm,v 1.11 2014/04/16 14:39:05 zhuk Exp $
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
my $oldlib = $lainfo->{old_library};
my $libdir = $lainfo->{libdir};
my $installed = $lainfo->{installed};
- my $d = abs_dir($self->{lafile});
+ my $d = abs_dir($self->{lafile});
# get the name we need (this may include a -release)
if (!$dlname && !$oldlib) {
die "Link error: neither static nor shared library found in $self->{lafile}\n";
$libfile = "$d/$oldlib";
}
if (! -f $libfile) {
- tsay {".la file ", $self->{lafile},
+ tsay {".la file ", $self->{lafile},
"points to nonexistent file ", $libfile, " !"};
}
} else {
tsay {"search path= ", join(':', @$dirs)};
tsay {"search type= ", $shared ? 'shared' : 'static'};
foreach my $sd (@$dirs) {
- if ($shared) {
+ if ($shared) {
# select correct library by sorting by version number only
my $bestlib = $self->findbest($sd, $libtofind);
if ($bestlib) {
tsay {"found $libtofind in $sd"};
$libfile = $bestlib;
last;
- } else {
+ } else {
# XXX find static library instead?
my $spath = "$sd/lib$libtofind$pic.a";
if (-f $spath) {
last;
}
}
- } else {
+ } else {
# look for a static library
my $spath = "$sd/lib$libtofind.a";
if (-f $spath) {
$libfile = $spath;
last;
}
- }
+ }
}
}
if (!$libfile) {
}
} else {
$self->{fullpath} = $libfile;
- tsay {"\$libs->{$self->{key}}->{fullpath} = ",
+ tsay {"\$libs->{$self->{key}}->{fullpath} = ",
$self->{fullpath}};
}
}
# ex:ts=8 sw=4:
-# $OpenBSD: Compile.pm,v 1.12 2012/07/12 12:35:21 espie Exp $
+# $OpenBSD: Compile.pm,v 1.13 2014/04/16 14:39:06 zhuk Exp $
#
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
},
'pie|fpie|fPIE',
sub {
- push(@pie_flags, $_[3]);
+ push(@pie_flags, $_[3]);
},
'no-suppress', # we just ignore that one
'prefer-pic', sub { $pic_mode = 1; },
# ex:ts=8 sw=4:
-# $OpenBSD: Link.pm,v 1.26 2014/04/16 10:31:27 zhuk Exp $
+# $OpenBSD: Link.pm,v 1.27 2014/04/16 14:39:06 zhuk Exp $
#
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
tie @{$o->{deplibs}}, 'LT::UList';
tie @{$o->{libdirs}}, 'LT::UList';
tie @{$o->{result}}, 'LT::UList';
- $self->internal_resolve_la($o, $lainfo->deplib_list,
+ $self->internal_resolve_la($o, $lainfo->deplib_list,
$level+1);
push(@{$o->{deplibs}}, @{$lainfo->deplib_list});
if ($lainfo->{libdir} ne '') {
if ($lafile) {
$libs->{$key}->{lafile} = $lafile;
my $absla = abs_path($lafile);
- tsay {" adding $absla to deplibs"}
+ tsay {" adding $absla to deplibs"}
if $level == 0;
push(@$deplibs, $absla);
push(@$result, $lafile);
push(@$deplibs, $arg);
push(@$result, $arg);
my $dummy = []; # no need to add deplibs recursively
- $self->internal_parse_linkargs1($dummy, $gp, $dirs,
+ $self->internal_parse_linkargs1($dummy, $gp, $dirs,
$libs, \@largs, $level+1) if @largs;
} elsif ($arg =~ m/(\S+\/)*(\S+)\.a$/) {
(my $key = $2) =~ s/^lib//;
{
my ($self, $deplibs, $gp, $dirs, $libs, $args) = @_;
$self->{result} = [];
- $self->internal_parse_linkargs1($deplibs, $gp, $dirs, $libs,
+ $self->internal_parse_linkargs1($deplibs, $gp, $dirs, $libs,
$self->{args});
- push(@$deplibs, '-pthread') if $self->{pthread};
+ push(@$deplibs, '-pthread') if $self->{pthread};
$self->{args} = $self->{result};
}
push @$libnames, split(/\s/, $librarynames);
} else {
push @$libnames, basename($f);
- }
+ }
foreach my $libfile (@$libnames) {
my $link = "$dir/$libfile";
tsay {"ln -s $f $link"};
my $orderedlibs = [];
tie(@$orderedlibs, 'LT::UList');
my $staticlibs = [];
- my $args = $parser->parse_linkargs2($gp, $orderedlibs, $staticlibs, $dirs,
+ my $args = $parser->parse_linkargs2($gp, $orderedlibs, $staticlibs, $dirs,
$libs);
tsay {"staticlibs = \n", join("\n", @$staticlibs)};
tsay {"orderedlibs = @$orderedlibs"};
-# $OpenBSD: Library.pm,v 1.4 2014/04/16 10:31:27 zhuk Exp $
+# $OpenBSD: Library.pm,v 1.5 2014/04/16 14:39:06 zhuk Exp $
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
push @cmd, @$args if $args;
push @cmd, @$objs if @$objs;
push @cmd, '-Wl,-whole-archive', @$staticlibs, '-Wl,-no-whole-archive'
- if @$staticlibs;
+ if @$staticlibs;
push @cmd, "-L$symlinkdir", @libflags if @libflags;
my @e = $linker->export_symbols($ltconfig,
-# $OpenBSD: Program.pm,v 1.4 2014/04/16 10:31:27 zhuk Exp $
+# $OpenBSD: Program.pm,v 1.5 2014/04/16 14:39:06 zhuk Exp $
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
$libdirs, $parser, $gp) = @_;
tsay {"linking program (", ($gp->static ? "not " : ""),
- "dynamically linking not-installed libtool libraries)"};
+ "dynamically linking not-installed libtool libraries)"};
my $fpath = $self->{outfilepath};
my $RPdirs = $self->{RPdirs};