summaryrefslogtreecommitdiff
path: root/usr.bin/libtool
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-07-09 17:54:28 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-07-09 17:54:28 +0000
commitd03c186c4c32739320c44f02c19f82290eef7be0 (patch)
treea0cf9e41fff68cbfebb8823d199a281b4bc8b8a3 /usr.bin/libtool
parent62566f4fdcb8e80e82bbe92b526b6e95e1632c11 (diff)
use short accessor
Diffstat (limited to 'usr.bin/libtool')
-rw-r--r--usr.bin/libtool/LT/Mode/Compile.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/libtool/LT/Mode/Compile.pm b/usr.bin/libtool/LT/Mode/Compile.pm
index bee291acac6..9234f06223b 100644
--- a/usr.bin/libtool/LT/Mode/Compile.pm
+++ b/usr.bin/libtool/LT/Mode/Compile.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Compile.pm,v 1.6 2012/07/09 14:34:06 espie Exp $
+# $OpenBSD: Compile.pm,v 1.7 2012/07/09 17:54:27 espie Exp $
#
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
@@ -43,6 +43,7 @@ sub run
my ($class, $ltprog, $gp, $noshared) = @_;
my $lofile = LT::LoFile->new;
+ $DB::single = 1;
$gp->handle_permuted_options('o:@',
'prefer-pic', 'prefer-non-pic', 'static');
# XXX options ignored: -prefer-pic and -prefer-non-pic
@@ -55,16 +56,13 @@ sub run
$nonpic = 1 if $gp->static;
my ($outfile, $odir, $ofile, $srcfile, $srcext);
- if($gp->{opt}{o} && @{$gp->{opt}{o}} > 1) {
- shortdie "$0: compile: Can't specify '-o' more than once\n";
- }
# XXX check whether -c flag is present and if not, die?
- if ($gp->{opt}{o}) {
- if (@{$gp->{opt}{o}} > 1) {
+ if ($gp->o) {
+ if ($gp->o > 1) {
shortdie "Can't specify -o more than once\n";
}
# fix extension if needed
- ($outfile = $gp->{opt}{o}[0]) =~ s/\.o$/.lo/;
+ ($outfile = ($gp->o)[0]) =~ s/\.o$/.lo/;
$odir = dirname($outfile);
$ofile = basename($outfile);
} else {