diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-07-12 09:43:35 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-07-12 09:43:35 +0000 |
commit | 0bbb7d268e3f3366bd5d4465abcec2ec381f16a2 (patch) | |
tree | a4ac13a7d34b13250e92f9206265693e17593c75 /usr.bin/libtool/LT/LaFile.pm | |
parent | 8dd4a2ef85264beba28733f364af90f544c08284 (diff) |
simplify yet a bit more
Diffstat (limited to 'usr.bin/libtool/LT/LaFile.pm')
-rw-r--r-- | usr.bin/libtool/LT/LaFile.pm | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/usr.bin/libtool/LT/LaFile.pm b/usr.bin/libtool/LT/LaFile.pm index 8fd66ffdb2e..4a6562a0727 100644 --- a/usr.bin/libtool/LT/LaFile.pm +++ b/usr.bin/libtool/LT/LaFile.pm @@ -1,4 +1,4 @@ -# $OpenBSD: LaFile.pm,v 1.13 2012/07/10 17:05:34 espie Exp $ +# $OpenBSD: LaFile.pm,v 1.14 2012/07/12 09:43:34 espie Exp $ # Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org> # Copyright (c) 2012 Marc Espie <espie@openbsd.org> @@ -231,20 +231,10 @@ sub link if ($odir ne '.') { $symlinkdir = "$odir/$ltdir"; } - mkdir $symlinkdir if (! -d $symlinkdir); - - tsay {"argvstring (pre resolve_la): @{$parser->{args}}"}; - my $args = $parser->resolve_la($deplibs, $libdirs); - tsay {"argvstring (post resolve_la): @{$parser->{args}}"}; - my $orderedlibs = []; - my $staticlibs = []; - $parser->{args} = $args; - $args = $parser->parse_linkargs2($gp, $orderedlibs, $staticlibs, $dirs, - $libs); - tsay {"staticlibs = \n", join("\n", @$staticlibs)}; - tsay {"orderedlibs = @$orderedlibs"}; - my $finalorderedlibs = reverse_zap_duplicates_ref($orderedlibs); - tsay {"final orderedlibs = @$finalorderedlibs"}; + mkdir $symlinkdir if ! -d $symlinkdir; + + my ($staticlibs, $finalorderedlibs, $args) = + $linker->common1($parser, $gp, $deplibs, $libdirs, $dirs, $libs); # static linking if (!$shared) { @@ -280,8 +270,8 @@ sub link push @libflags, @kobjs; } } - push @cmd, @libflags if (@libflags); - push @cmd, @$objs if (@$objs); + push @cmd, @libflags if @libflags; + push @cmd, @$objs if @$objs; LT::Exec->link(@cmd); LT::Exec->link('ranlib', $dst); return; |