Skip to content

Commit

Permalink
[config] check ptrsize on darwin and cygwin for amd64
Browse files Browse the repository at this point in the history
previously we missed 64bit on darwin -2level systems, which really are
64bit CPUs. cygwin64 also exists already.
remove duplicate auto::cpu run.
  • Loading branch information
Reini Urban committed Jun 21, 2014
1 parent b6e54ba commit 9da27cc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions config/auto/arch.pm
Expand Up @@ -60,14 +60,15 @@ sub runstep {

# This was added to convert 9000/800 to 9000_800 on HP-UX
$cpuarch =~ s|/|_|g;
my $ptrsize = $conf->data->get('ptrsize_provisional');

# On OS X if you are using the Perl that shipped with the system
# the above split fails because archname is "darwin-thread-multi-2level".
if ( $cpuarch =~ /darwin/ ) {
$osname = 'darwin';
$cpuarch = ( $self->{unamep} eq 'powerpc' )
? 'ppc'
: 'i386';
: $ptrsize == 8 ? 'amd64' : 'i386';
}

# cpuarch and osname are reversed in archname on windows
Expand All @@ -76,7 +77,7 @@ sub runstep {
$osname = 'MSWin32';
}
elsif ( $osname =~ /cygwin/i || $cpuarch =~ /cygwin/i ) {
$cpuarch = 'i386';
$cpuarch = $ptrsize == 8 ? 'amd64' : 'i386';
$osname = 'cygwin';
}
elsif ( $osname =~ /msys/i || $cpuarch =~ /msys/i ) {
Expand Down
2 changes: 1 addition & 1 deletion config/auto/cpu.pm
Expand Up @@ -23,7 +23,7 @@ use Carp;
sub _init {
my $self = shift;
my %data;
$data{description} = q{Generate CPU specific stuff};
$data{description} = q{Check CPU specific info};
$data{result} = q{};
return \%data;
}
Expand Down
3 changes: 1 addition & 2 deletions config/init/defaults.pm
Expand Up @@ -56,6 +56,7 @@ sub runstep {
# Stage 1:
foreach my $orig ( qw|
archname
ptrsize
ccflags
d_socklen_t
optimize
Expand Down Expand Up @@ -305,8 +306,6 @@ sub _64_bit_adjustments {
$archname =~ s/x86_64/i386/;

# adjust gcc?
## add parentheses around qw(...)
## to remove deprecation warning in perl 5.14.0
for my $cc (qw(cc cxx link ld)) {
$conf->data->add( ' ', $cc, '-m32' );
}
Expand Down
1 change: 0 additions & 1 deletion lib/Parrot/Configure/Step/List.pm
Expand Up @@ -22,7 +22,6 @@ my @steps = qw(
auto::attributes
auto::warnings
auto::arch
auto::cpu
init::optimize
inter::shlibs
inter::libparrot
Expand Down

0 comments on commit 9da27cc

Please sign in to comment.