Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jrobinson/configure for cross #3

Open
wants to merge 58 commits into
base: jrobinson/configure-for-cross
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
62c0632
Fix the SKIP for android in t/run/fresh_perl.t
Hugmeir Apr 24, 2013
98da9eb
t/op/incfilter.t: Work around android only having an inbuilt echo
Hugmeir Apr 24, 2013
b05ed0b
t/op/magic.t: Work around android only having an inbuilt pwd
Hugmeir Apr 24, 2013
7ab3c36
Makefile.SH: on make test_prep, add $target/lib:$target/lib/auto to -…
Hugmeir Apr 24, 2013
0ae4266
t/lib/warnings/pp_sys: Add skips in case telldir is not available
Hugmeir Apr 24, 2013
9b2b103
t/op/fork.t: Work around android only having an inbuilt echo
Hugmeir Apr 24, 2013
f7536a3
t/op/fork.t: Up the sleep time in a test to avoid timing issues
Hugmeir Apr 24, 2013
862723e
t/op/stat.t: use 'ls -l' on android, even if d_readlink is defined
Hugmeir Apr 24, 2013
cd9bf2e
t/op/sigdispatch.t: Increase timeout to avoid issues on slow processors
Hugmeir Apr 25, 2013
fef54c3
hints/linux-androideabi.sh: use randfunc=random and randbits=31
Hugmeir Apr 25, 2013
98285ba
On Android, set $ENV{TMPDIR} on the tests for open($fh, undef)
Hugmeir Apr 26, 2013
6d8b1b1
perlio.c, PerlIO_tmpfile: Fall back to cwd if we have no /tmp or TMPDIR
Hugmeir Apr 26, 2013
b727616
Android hints: Detect stub functions and mark them as undefined.
Hugmeir Apr 28, 2013
b128358
time64.h: Declare tm_zone as const under Android, but not if using C++
Hugmeir May 18, 2013
db3d3b7
MakeMaker: Groundwork for d_libname_unique
Hugmeir May 15, 2013
3a353f1
Teach XSLoader about d_libname_unique
Hugmeir May 15, 2013
e84224c
Teach DynaLoader about d_libname_unique
Hugmeir May 15, 2013
8c49bb7
android hints: Always define d_libname_unique
Hugmeir May 15, 2013
18a97d0
t/op/getpid.t: Silence undef warnings if getconf doesn't exist.
Hugmeir May 16, 2013
a7f5067
pod/perlport.pod: Note which functions are not available on Android
Hugmeir May 18, 2013
e041e65
t/op/threads-dirh.t: Only test telldir and seekdir if they are available
Hugmeir May 18, 2013
8dd3ffe
doio.c: Two variables only need to be available if -DUSE_SHELL_ALWAYS…
Hugmeir May 18, 2013
7a6f616
sv.c, Perl_dirp_dup: Skip the fchdir sections if telldir and seekdir …
Hugmeir May 18, 2013
17ce377
hints/linux-androideabi.sh: getservent_r() is a partial stub, mark it…
Hugmeir May 18, 2013
6bcb8af
t/op/exec.t: Skip a test under -DUSE_SHELL_ALWAYS
Hugmeir May 18, 2013
6a89113
t/lib/warnings/9uninit: Skip two tests under -DUSE_SHELL_ALWAYS
Hugmeir May 18, 2013
476d0f6
t/io/pipe.t: Skip test under -DUSE_SHELL_ALWAYS
Hugmeir May 18, 2013
ac3dc7a
perlport: warn that exec+USE_SHELL_ALWAYS may not behave as expected
Hugmeir May 18, 2013
b2888fb
Makefile.SH, test_prep: Copy all the files needed by make test
Hugmeir May 19, 2013
bc43fce
t/porting/: Skips for cross-compilation
Hugmeir May 19, 2013
e4c8127
lib/ExtUtils/t/Embed.t: Skip tests is cross-compiling and $Config{cc}…
Hugmeir May 19, 2013
5cd5c7b
dist/IO/t/io_pipe.t: Work around android only having an inbuilt echo
Hugmeir Apr 26, 2013
70a7de7
Net::Ping: Handle getprotobyn{ame,umber} not being available
Hugmeir Apr 29, 2013
cc0425b
IO::Socket::INET: Handle getprotobyn{ame,umber} not being available
Hugmeir Apr 29, 2013
5c3af62
File::Spec::Unix->tmpdir: Always return an absolute path
Hugmeir May 19, 2013
e157651
dist/ExtUtils-Install: Skip tests if make is not available
Hugmeir May 19, 2013
66be4bd
ext/File-Glob/t/basic.t: On android, remove .stdout files from glob()…
Hugmeir May 14, 2013
a1decc2
ext/POSIX/t/time.t: Conditionalize the use of setlocale/LC_TIME
Hugmeir Apr 26, 2013
0dfb13f
ext/POSIX/t/sysconf.t: Skip testing pathconf with _PC_LINK_MAX on and…
Hugmeir Apr 26, 2013
2b09113
ext/IPC-Open3/t/IPC-Open3.t: TODO a test under -DUSE_SHELL_ALWAYS
Hugmeir May 18, 2013
3f984a0
Skip the VMS tests if not on VMS
Hugmeir May 19, 2013
d4baa5e
cpan/Sys-Syslog/Syslog.pm: Conditionalize the use of setlocale/LC_TIME
Hugmeir Apr 26, 2013
f8df010
Net::Domain: Stop domainname() from giving out warnings in android
Hugmeir May 14, 2013
3051b26
Perl::OStype: Report Android as a Unix-like OS.
Hugmeir Apr 26, 2013
83f26cf
Sys::Syslog: handle getprotobyn{ame,umber} not being available
Hugmeir Apr 29, 2013
cef13a0
cpan/Socket/Socket.pm: Protect against getprotobyname() not being ava…
Hugmeir Apr 29, 2013
0e4f8cd
cpan/IO-Compress/t/050interop-gzip.t: Call gzip with "-d -c" instead …
Hugmeir May 14, 2013
1b33a37
cpan/autodie/t/open.t: Work around android only having a built-in true
Hugmeir May 14, 2013
74f8efe
cpan/DB_File: Checks if tests should be skipped under PERL_CORE
Hugmeir May 19, 2013
acf5f04
cpan/Module-Build/t/lib/MBTest.pm, check_compiler: Return false if cr…
Hugmeir May 19, 2013
625aa53
cpan/ExtUtils-MakeMaker: Skips if make is not available
Hugmeir May 19, 2013
d8ae41c
cpan/ExtUtils-Constant/t/Constant.t: Skip tests if cross-compiling an…
Hugmeir May 19, 2013
b6fe21d
Win32: Skip tests if not on Windows
Hugmeir May 19, 2013
233db21
cpan/IO-Zlib/Zlib.pm: Use android-compatible flags when calling gzip
Hugmeir May 19, 2013
1866005
cpan/CPAN/lib/CPAN/Tarzip.pm: Use android-compatible flags when calli…
Hugmeir May 19, 2013
3b500eb
cpan/Archive-Extract/lib/Archive/Extract.pm: Use android-compatible f…
Hugmeir May 19, 2013
ef94175
CPANPLUS::Dist::MM: Skip tests if make is not available
Hugmeir May 19, 2013
13ddde0
Configure: Pass the -r flag to scp when cross-compiling
Hugmeir Aug 9, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -3023,11 +3023,11 @@ do
case "\$f" in
/*)
$targetmkdir \`dirname \$f\`
$targetto -P $targetport $q \$f $targetuser@$targethost:\$f || exit 1
$targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f || exit 1
;;
*)
$targetmkdir $targetdir/\`dirname \$f\`
$targetto -P $targetport $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
$targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
;;
esac
done
Expand Down
60 changes: 57 additions & 3 deletions Makefile.SH
Original file line number Diff line number Diff line change
Expand Up @@ -1514,9 +1514,63 @@ test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE
$to lib
$to TestInit.pm
$to win32/FindExt.pm
$to regen/keywords.pl
$to pod/perldiag.pod
$to regen
$to pod
$to MANIFEST
$to Porting
$to cpan/*/t
$to dist/*/t
$to ext/*/t
$to cpan/Term-Cap/test.pl
$to cpan/Pod-Usage
$to cpan/Pod-Parser
$to cpan/IO-Compress/examples
$to cpan/HTTP-Tiny/lib
$to cpan/Filter-Util-Call/filter-util.pl
$to cpan/File-CheckTree/lib
$to cpan/Digest-MD5/README
$to cpan/Digest-MD5/MD5.xs
$to cpan/Digest-SHA/src
$to cpan/Test-Simple/examples
$to cpan/Pod-Parser/lib
$to cpan/Test-Harness/MANIFEST
$to cpan/Test-Harness/MANIFEST.CUMMULATIVE
$to cpan/List-Util/blib
$to ext/IPC-Open3/Makefile
$to ext/Tie-Memoize/lib
$to ext/POSIX/POSIX.xs
$to ext/POSIX/Makefile.PL
$to dist/IO/Makefile.PL
# --- These two are needed by ExtUtils::MM_Unix to verify PERL_CORE
$to config_h.SH
$to perl.h
$to cflags
# --- For Module::Build
$to cpan/Module-Build/lib
$to *.h
# --- For t/porting/perlfunc.t
$to ext/Pod-Functions
# --- For t/porting/pod_rules.t
$to Makefile.SH
$to cpan/perlfaq
$to cpan/Pod-Perldoc/lib/perldoc.pod
$to dist/ExtUtils-ParseXS/lib/perlxs.pod
$to dist/ExtUtils-ParseXS/lib/perlxstut.pod
$to dist/ExtUtils-ParseXS/lib/perlxstypemap.pod
$to win32/Makefile
$to win32/makefile.mk
$to win32/pod.mak
$to vms/descrip_mms.template
# --- For t/porting/regen.t
$to keywords.c
$to regen.pl
$to regen_perly.pl
$to perly.tab
$to perly.act
$to perly.y
$to uconfig.sh
# --- For t/x2p/s2p.t
$to x2p
cd t && (rm -f \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd ..
$to t/\$(PERL_EXE)

Expand All @@ -1541,7 +1595,7 @@ test check: test_prep
*) $spitshell >>$Makefile <<!GROK!THIS!

test check: test_prep
$run -cwd $targetdir/t -env LD_LIBRARY_PATH=$targetdir ./TEST
$run -cwd $targetdir/t -env LD_LIBRARY_PATH=$targetdir:$targetdir/lib:$targetdir/lib/auto ./TEST

!GROK!THIS!
;;
Expand Down
2 changes: 1 addition & 1 deletion cpan/Archive-Extract/lib/Archive/Extract.pm
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ sub _gunzip_bin {
return $self->_error(loc("Could not open '%1' for writing: %2",
$self->_gunzip_to, $! ));

my $cmd = [ $self->bin_gzip, '-cdf', $self->archive ];
my $cmd = [ $self->bin_gzip, '-c', '-d', '-f', $self->archive ];

my $buffer;
unless( scalar run( command => $cmd,
Expand Down
6 changes: 3 additions & 3 deletions cpan/CPAN/lib/CPAN/Tarzip.pm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ sub gunzip {
return 1;
} else {
my $command = CPAN::HandleConfig->safe_quote($self->{UNGZIPPRG});
system(qq{$command -dc "$read" > "$write"})==0;
system(qq{$command -d -c "$read" > "$write"})==0;
}
}

Expand Down Expand Up @@ -188,7 +188,7 @@ sub TIEHANDLE {
$class->debug("via Compress::Zlib");
} else {
my $gzip = CPAN::HandleConfig->safe_quote($self->{UNGZIPPRG});
my $pipe = "$gzip -dc $file |";
my $pipe = "$gzip -d -c $file |";
my $fh = FileHandle->new($pipe) or $CPAN::Frontend->mydie("Could not pipe[$pipe]: $!");
binmode $fh;
$self->{FH} = $fh;
Expand Down Expand Up @@ -322,7 +322,7 @@ Can't continue cutting file '$file'.
my $tarcommand = CPAN::HandleConfig->safe_quote($exttar);
if ($is_compressed) {
my $command = CPAN::HandleConfig->safe_quote($extgzip);
$system = qq{$command -dc }.
$system = qq{$command -d -c }.
qq{< "$file" | $tarcommand x${tar_verb}f -};
} else {
$system = qq{$tarcommand x${tar_verb}f "$file"};
Expand Down
10 changes: 7 additions & 3 deletions cpan/CPANPLUS/t/04_CPANPLUS-Module.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use Test::More 'no_plan';
use Data::Dumper;
use File::Spec;
use File::Path ();
use IPC::Cmd qw(can_run);

my $Conf = gimme_conf();
my $CB = CPANPLUS::Backend->new( $Conf );
Expand Down Expand Up @@ -305,9 +306,12 @@ isa_ok( $Auth->parent, 'CPANPLUS::Backend' );
" Object" );

### skiptests to make sure we don't get any test header mismatches
my $rv = $bundle->create( prereq_target => 'create', skiptest => 1 );
ok( $rv, " Tested prereqs" );

SKIP: {
skip "make isn't available, not testing ->create", 1
if !can_run('make');
my $rv = $bundle->create( prereq_target => 'create', skiptest => 1 );
ok( $rv, " Tested prereqs" );
}
}

### test module from perl core ###
Expand Down
8 changes: 7 additions & 1 deletion cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ use CPANPLUS::Dist;
use CPANPLUS::Dist::MM;
use CPANPLUS::Internals::Constants;

use Test::More 'no_plan';
use Test::More;
use Cwd;
use Config;
use Data::Dumper;
use File::Basename ();
use File::Spec ();
use IPC::Cmd ();

if ( !IPC::Cmd::can_run('make') ) {
plan skip_all => "make is not available, can't test CPANPLUS::Dist::MM";
}

my $conf = gimme_conf();
my $cb = CPANPLUS::Backend->new( $conf );
Expand Down Expand Up @@ -419,6 +424,7 @@ sub _custom_makefile_pl_sub {
}
}

done_testing;

# Local variables:
# c-indentation-style: bsd
Expand Down
2 changes: 1 addition & 1 deletion cpan/DB_File/t/db-btree.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strict;
use Config;

BEGIN {
if(-d "lib" && -f "TEST") {
if((-d "lib" && -f "TEST") || $ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
Expand Down
4 changes: 2 additions & 2 deletions cpan/DB_File/t/db-hash.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
use warnings;
use strict;
use Config;

BEGIN {
if(-d "lib" && -f "TEST") {
if((-d "lib" && -f "TEST") || $ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion cpan/DB_File/t/db-recno.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use Config;

BEGIN {
if(-d "lib" && -f "TEST") {
if((-d "lib" && -f "TEST") || $ENV{PERL_CORE}) {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
Expand Down
7 changes: 7 additions & 0 deletions cpan/ExtUtils-Constant/t/Constant.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use ExtUtils::Constant qw (C_constant autoload);
use File::Spec;
use Cwd;

use IPC::Cmd qw(can_run);

my $do_utf_tests = $] > 5.006;
my $better_than_56 = $] > 5.007;
# For debugging set this to 1.
Expand All @@ -38,6 +40,11 @@ my $make = $Config{make};
$make = $ENV{MAKE} if exists $ENV{MAKE};
if ($^O eq 'MSWin32' && $make eq 'nmake') { $make .= " -nologo"; }

if ( $Config{usecrosscompile} && !can_run($make) ) {
print "1..0 # Cross-compiling and $make isn't available, skupping\n";
exit 0;
}

# VMS may be using something other than MMS/MMK
my $mms_or_mmk = 0;
my $vms_lc = 0;
Expand Down
10 changes: 9 additions & 1 deletion cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue);

# If we make $VERSION an our variable parse_version() breaks
use vars qw($VERSION);
$VERSION = '6.66';
$VERSION = '6.67';
$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]

require ExtUtils::MM_Any;
Expand Down Expand Up @@ -959,6 +959,14 @@ MAKE
$(CHMOD) $(PERM_RWX) $@
MAKE

if ( $Config::Config{d_libname_unique} ) {
push @m, <<'MAKE';
# --- d_libname_unique is true, so library names should be "unique"
$(MV) $(INST_DYNAMIC) $(INST_ARCHAUTODIR)/Perl_$(NAME_SYM).$(DLEXT)
-$(MV) $(INST_BOOT) $(INST_ARCHAUTODIR)/Perl_$(NAME_SYM).bs
MAKE
}

return join('',@m);
}

Expand Down
2 changes: 1 addition & 1 deletion cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ our @Overridable;
my @Prepend_parent;
my %Recognized_Att_Keys;

our $VERSION = '6.66';
our $VERSION = '6.67';
$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]

# Emulate something resembling CVS $Revision$
Expand Down
3 changes: 3 additions & 0 deletions cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ ok( grep(/^Writing $makefile for Big::Dummy/,
@mpl_out) == 1,
'Makefile.PL output looks right');

SKIP: {
my $make = make_run();
skip "make is not available", 14 if !$make;
run("$make"); # this is necessary due to a dmake bug.
my $install_out = run("$make install");
is( $?, 0, ' make install exited normally' ) || diag $install_out;
Expand Down Expand Up @@ -72,3 +74,4 @@ is( $?, 0, 'realclean' ) || diag($realclean_out);

open(STDERR, ">&SAVERR") or die $!;
close SAVERR;
}
3 changes: 3 additions & 0 deletions cpan/ExtUtils-MakeMaker/t/PL_FILES.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ ok chdir('PL_FILES-Module');
run(qq{$perl Makefile.PL});
cmp_ok( $?, '==', 0 );

SKIP: {
skip "make is not available", 5 if !$make;
my $make_out = run("$make");
is( $?, 0 ) || diag $make_out;

foreach my $file (qw(single.out 1.out 2.out blib/lib/PL/Bar.pm)) {
ok( -e $file, "$file was created" );
}
}
16 changes: 13 additions & 3 deletions cpan/ExtUtils-MakeMaker/t/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@ use strict;
use Config;
use ExtUtils::MakeMaker;

use Test::More tests => 171;
use Test::More;
use MakeMaker::Test::Utils;

my $make;
BEGIN {
$make = make_run();
if ( !make ) {
plan skip_all => "make isn't available";
}
else {
plan tests => 171;
}
}

use MakeMaker::Test::Setup::BFD;
use File::Find;
use File::Spec;
Expand Down Expand Up @@ -61,8 +73,6 @@ cmp_ok( $Touch_Time, '<=', $mtime, ' its been touched' );

END { unlink makefile_name(), makefile_backup() }

my $make = make_run();

{
# Supress 'make manifest' noise
local $ENV{PERL_MM_MANIFEST_VERBOSE} = 0;
Expand Down
2 changes: 2 additions & 0 deletions cpan/ExtUtils-MakeMaker/t/echo.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ $mm->init_tools; # need ECHO
# Run Perl with the currently installing MakeMaker
$mm->{$_} .= q[ "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"] for qw( PERLRUN FULLPERLRUN ABSPERLRUN );

plan skip_all => "make isn't available" if !$make;

#------------------- Testing functions

sub test_for_echo {
Expand Down
42 changes: 42 additions & 0 deletions cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ sub make {
my $make = $Config{make};
$make = $ENV{MAKE} if exists $ENV{MAKE};

return if !can_run($make);
return $make;
}

Expand All @@ -224,6 +225,7 @@ Returns the make to run as with make() plus any necessary switches.

sub make_run {
my $make = make;
return if !$make;
$make .= ' -nologo' if $make eq 'nmake';

return $make;
Expand Down Expand Up @@ -411,6 +413,46 @@ sub slurp {
return $text;
}


=item can_run

$exec = can_run($exec);

Returns the executable, possibly with a full path attached, if it can be
run. Basically IPC::Cmd::can_run.

=cut

sub can_run {
my $command = shift;

# a lot of VMS executables have a symbol defined
# check those first
if ( $^O eq 'VMS' ) {
require VMS::DCLsym;
my $syms = VMS::DCLsym->new;
return $command if scalar $syms->getsym( uc $command );
}

my @possibles;

if( File::Spec->file_name_is_absolute($command) ) {
return MM->maybe_command($command);

} else {
for my $dir (
File::Spec->path,
File::Spec->curdir
) {
next if ! $dir || ! -d $dir;
my $abs = File::Spec->catfile( $^O eq 'MSWin32' ? Win32::GetShortPathName( $dir ) : $dir, $command);
push @possibles, $abs if $abs = MM->maybe_command($abs);
}
}

return shift @possibles;
}

=back

=head1 AUTHOR
Expand Down
Loading