File: cygwin.pm

package info (click to toggle)
libextutils-cbuilder-perl 0.11-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 124 kB
  • ctags: 69
  • sloc: perl: 862; makefile: 44
file content (30 lines) | stat: -rw-r--r-- 676 bytes parent folder | download
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
package ExtUtils::CBuilder::Platform::cygwin;

use strict;
use File::Spec;
use ExtUtils::CBuilder::Platform::Unix;

use vars qw(@ISA);
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);

sub link_executable {
  my $self = shift;
  # $Config{ld} is set up as a special script for building
  # perl-linkable libraries.  We don't want that here.
  local $self->{config}{ld} = 'gcc';
  return $self->SUPER::link_executable(@_);
}

sub link {
  my ($self, %args) = @_;

  $args{extra_linker_flags} = [
    '-L'.File::Spec->catdir($self->{config}{archlibexp}, 'CORE'),
    '-lperl',
    $self->split_like_shell($args{extra_linker_flags})
  ];

  return $self->SUPER::link(%args);
}

1;