1# Copyright (C) 2005, Parrot Foundation.
2
3package init::hinits::irix;
4
5use strict;
6use warnings;
7
8sub runstep {
9    my ( $self, $conf ) = @_;
10
11    my $ccflags = $conf->data->get('ccflags') || "";
12
13    # 1185 An enumerated type is mixed with another type.
14    if ( $ccflags =~ /-woff / ) {
15        $ccflags =~ s/-woff (?:\d+,)*\d+/-woff 1185/;
16    }
17    else {
18        $ccflags .= ' -woff 1185';
19    }
20    $conf->data->set( ccflags => $ccflags );
21
22    my $libs = $conf->data->get('libs');
23    if ( $libs !~ /-lpthread\b/ ) {
24        $libs .= ' -lpthread';
25    }
26    $conf->data->set( libs => $libs );
27
28    my $cc   = $conf->data->get('cc');
29    my $cxx  = $conf->data->get('cxx');
30    my $ld   = $conf->data->get('ld');
31    my $link = $conf->data->get('link');
32    if ( $cc =~ /cc -64/ ) {
33        $cxx  = 'CC -64';
34        $ld   = 'CC -64';
35        $link = 'CC -64';
36        $conf->data->set(
37            cxx  => $cxx,
38            ld   => $ld,
39            link => $link,
40        );
41    }
42}
43
441;
45
46# Local Variables:
47#   mode: cperl
48#   cperl-indent-level: 4
49#   fill-column: 100
50# End:
51# vim: expandtab shiftwidth=4:
52