[BACK]Return to libtool CVS log [TXT][DIR] Up to [local] / src / usr.bin / libtool

Diff for /src/usr.bin/libtool/libtool between version 1.34 and 1.35

version 1.34, 2012/07/10 09:51:32 version 1.35, 2012/07/10 12:24:45
Line 41 
Line 41 
 use Config;  use Config;
 use LT::Util;  use LT::Util;
   
   my @picflags =qw(-fPIC -DPIC);
   
 sub new  sub new
 {  {
     my $class = shift;              my $class = shift;
     # XXX: incomplete              # XXX: incomplete
     my $self = {              my $self = {
         machine_arch => $Config{ARCH},                  machine_arch => $Config{ARCH},
         ltdir => $ltdir,                  ltdir => $ltdir,
         version => $version,                  version => $version,
         objdir => $ltdir,                  objdir => $ltdir,
         build_old_libs => 'yes',                  build_old_libs => 'yes',
         pic_flags => join(' ', @picflags),                  pic_flags => join(' ', @picflags),
     };              };
     ($self->{gnu_arch} = $self->{machine_arch}) =~ s/amd64/x86_64/;              ($self->{gnu_arch} = $self->{machine_arch}) =~ s/amd64/x86_64/;
   
     if (grep { $_ eq $self->{machine_arch} } qw(m88k vax)) {              if (grep { $_ eq $self->{machine_arch} } qw(m88k vax)) {
         $self->{build_libtool_libs} = 'yes';                  $self->{build_libtool_libs} = 'yes';
         $self->{noshared} = 1;                  $self->{noshared} = 1;
     } else {              } else {
         $self->{build_libtool_libs} = 'no';                  $self->{build_libtool_libs} = 'no';
         $self->{noshared} = 0;                  $self->{noshared} = 0;
     }              }
   
     bless $self, $class;              bless $self, $class;
 }  }
   
   sub noshared
   {
           my $self = shift;
           return $self->{noshared};
   }
   
   sub host
   {
           my $self = shift;
           if (!defined $self->{osversion}) {
                   chomp($self->{osversion} = `uname -r`);
           }
           return "$self->{gnu_arch}-unknown-openbsd$self->{osversion}";
   }
   
   # XXX
   sub picflags
   {
           my $self = shift;
           return \@picflags;
   }
   
   sub sharedflag
   {
           return '-shared';
   }
   
   sub version
   {
           my $self = shift;
           return $self->{version};
   }
   
 sub dump  sub dump
 {  {
         my $self = shift;          my $self = shift;
Line 152 
Line 187 
 our @ISA = qw(LT::Mode);  our @ISA = qw(LT::Mode);
 sub run  sub run
 {  {
         my ($class, $ltprog, $gp, $noshared) = @_;          my ($class, $ltprog, $gp, $ltconfig) = @_;
         # XXX check whether this is right          # XXX check whether this is right
         LT::Exec->silent_run;          LT::Exec->silent_run;
         LT::Exec->execute(@$ltprog, @main::ARGV);          LT::Exec->execute(@$ltprog, @main::ARGV);
Line 311 
Line 346 
                 },                  },
     '-dry-run|-dryrun|n' => sub { LT::Exec->dry_run; },      '-dry-run|-dryrun|n' => sub { LT::Exec->dry_run; },
     '-features' => sub {      '-features' => sub {
                 my $v = `uname -r`;                  say "host: ", $ltconfig->host;
                 chomp $v;                  say "enable shared libraries" unless $ltconfig->noshared;
                 say "host: $ltconfig->{gnu_arch}-unknown-openbsd$v";  
                 say "enable shared libraries" unless $ltconfig->{noshared};  
                 say "enable static libraries";                  say "enable static libraries";
                 exit 0;                  exit 0;
             },              },
Line 328 
Line 361 
     '-verbose|-no-silent|-no-quiet|v' => sub {$verbose = 1;},      '-verbose|-no-silent|-no-quiet|v' => sub {$verbose = 1;},
     '-tag=' => sub { $gp->add_tag($_[2]); },      '-tag=' => sub { $gp->add_tag($_[2]); },
     '-version' => sub {      '-version' => sub {
                     say "libtool (not (GNU libtool)) $ltconfig->{version}";                      say "libtool (not (GNU libtool)) ", $ltconfig->version;
                     exit 0;                      exit 0;
                 },                  },
     '-no-warning|-no-warn' => sub {},      '-no-warning|-no-warn' => sub {},
Line 399 
Line 432 
   
 # from here, options may be intermixed with arguments  # from here, options may be intermixed with arguments
   
 $mode->run($ltprog, $gp, $ltconfig->{noshared});  $mode->run($ltprog, $gp, $ltconfig);
   
 if (LT::Exec->performed == 0) {  if (LT::Exec->performed == 0) {
         die "No commands to execute.\n"          die "No commands to execute.\n"

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35