Brian Fraser [Sun, 26 Jan 2014 04:06:40 +0000 (01:06 -0300)]
Configure: Fix the fflush(NULL) test in cross builds
Second attempt at this. This is less portable than the previous
version, since it assumes that the target system will have a cat, but unlike
the previous version this now actually works.
Brian Fraser [Sat, 25 Jan 2014 04:54:07 +0000 (05:54 +0100)]
README.android: minor wording fixups
Brian Fraser [Wed, 22 Jan 2014 13:17:53 +0000 (10:17 -0300)]
reentr.c: Handle systems without getpwent
Namely, Android.
Brian Fraser [Tue, 21 Jan 2014 17:09:58 +0000 (14:09 -0300)]
ExtUtils::ParseXS: Fix tests for native android builds
Brian Fraser [Tue, 21 Jan 2014 18:22:58 +0000 (15:22 -0300)]
AUTHORS and MANIFEST for the CBuilder Android patch
Brian Fraser [Sun, 26 Jan 2014 16:07:49 +0000 (13:07 -0300)]
Up the version of ExtUtils::CBuilder
Brian Fraser [Tue, 21 Jan 2014 16:15:56 +0000 (13:15 -0300)]
CBuilder, android: Fix the useshrplib check
Piotr Roszatycki [Wed, 15 Jan 2014 22:34:57 +0000 (23:34 +0100)]
ExtUtils::CBuilder: Android with useshrplib needs -lperl
Brian Fraser [Tue, 21 Jan 2014 18:23:12 +0000 (15:23 -0300)]
pod fixups on README.android
Brian Fraser [Mon, 20 Jan 2014 15:54:04 +0000 (12:54 -0300)]
README.android: Notes about cross-compiling from a x86 host
Brian Fraser [Sun, 19 Jan 2014 19:17:45 +0000 (16:17 -0300)]
README.android: Update for native builds
Brian Fraser [Sat, 9 Nov 2013 19:31:34 +0000 (16:31 -0300)]
Added README.android
Brian Fraser [Mon, 13 Jan 2014 05:31:18 +0000 (02:31 -0300)]
Cwd.pm: Handle native android builds better
Brian Fraser [Fri, 26 Apr 2013 07:16:19 +0000 (04:16 -0300)]
ext/POSIX/t/sysconf.t: Skip testing pathconf with _PC_LINK_MAX on android
Brian Fraser [Mon, 29 Apr 2013 04:08:13 +0000 (01:08 -0300)]
IO::Socket::INET: Handle getprotobyn{ame,umber} not being available
Brian Fraser [Mon, 29 Apr 2013 03:23:56 +0000 (00:23 -0300)]
Net::Ping: Handle getprotobyn{ame,umber} not being available
Brian Fraser [Fri, 26 Apr 2013 01:57:01 +0000 (22:57 -0300)]
dist/IO/t/io_pipe.t: Work around android only having an inbuilt echo
Brian Fraser [Tue, 12 Nov 2013 06:19:17 +0000 (03:19 -0300)]
t/op/sigdispatch.t: SKIP, not TODO
Brian Fraser [Wed, 13 Nov 2013 02:59:15 +0000 (23:59 -0300)]
t/io/fs.t: Handle Android's pwd being a shell builtin
Brian Fraser [Mon, 12 Aug 2013 00:00:26 +0000 (21:00 -0300)]
t/op/filetest.t: On Android, don't try checking if ln exists with which
Assume that it does -- even the most barebone of toolbox binaries
provides ln, but not which.
Brian Fraser [Thu, 25 Apr 2013 16:46:09 +0000 (13:46 -0300)]
t/op/sigdispatch.t: Increase timeout to avoid issues on slow processors
Brian Fraser [Wed, 24 Apr 2013 22:58:33 +0000 (19:58 -0300)]
t/op/stat.t: use 'ls -l' on android, even if d_readlink is defined
Brian Fraser [Wed, 24 Apr 2013 22:08:21 +0000 (19:08 -0300)]
t/op/fork.t: Up the sleep time in a test to avoid timing issues
Brian Fraser [Wed, 24 Apr 2013 22:07:44 +0000 (19:07 -0300)]
t/op/fork.t: Work around android only having an inbuilt echo
Brian Fraser [Tue, 12 Nov 2013 06:40:44 +0000 (03:40 -0300)]
t/op/magic.t: Skip tests that use env on Android
Brian Fraser [Wed, 24 Apr 2013 05:28:12 +0000 (02:28 -0300)]
t/op/magic.t: Work around android only having an inbuilt pwd
Brian Fraser [Wed, 24 Apr 2013 04:09:42 +0000 (01:09 -0300)]
t/op/incfilter.t: Work around android only having an inbuilt echo
Jess Robinson [Fri, 19 Apr 2013 11:08:34 +0000 (12:08 +0100)]
t/op/sigdispatch.t: TODO tests that don't work on some Android builds
Jess Robinson [Fri, 19 Apr 2013 11:08:34 +0000 (12:08 +0100)]
t/op/magic.t: TODO tests that don't work on some cross-compile builds
Jess Robinson [Fri, 19 Apr 2013 11:08:34 +0000 (12:08 +0100)]
t/op/sprintf.t: Add Android to the list of skips for %.0g
Jess Robinson [Fri, 19 Apr 2013 11:02:19 +0000 (12:02 +0100)]
Adjust fs test to try more ways of getting the CWD. Expire if we still didn't get it.
Brian Fraser [Sat, 18 May 2013 00:55:08 +0000 (21:55 -0300)]
pod/perlport.pod: Note which functions are not available on Android
Brian Fraser [Fri, 15 Nov 2013 06:39:02 +0000 (03:39 -0300)]
Configure: If cross-compiling to linux, pick the proper hints file
Something like arm-linux-gnueabihf -- which is what the raspberry pi
gets as its targetarch -- is really just plain Linux, so set osname
to that and load up the hints file.
Brian Fraser [Fri, 11 Oct 2013 19:55:08 +0000 (16:55 -0300)]
Configure: added special osname checks for nto and android
When cross-compiling, for android, anything matching *linux-android*
gets osname=linux-androideabi. This is to allow compiling to
all three android variants (x86, arm, mips).
For QNX Neutrino, anything matching nto*|*-nto-* gets osname=nto. In
the future, that might change to 'qnx', but right now we don't want
it to pick up the hints file.
For anything else, keep the current behavior, which is to set osname
to the output of `echo $targetarch|sed 's,^[^-]*-,,'`
Brian Fraser [Thu, 23 Jan 2014 22:41:22 +0000 (23:41 +0100)]
Android hints: Set d_csh to undef in cross builds
Brian Fraser [Thu, 23 Jan 2014 14:13:34 +0000 (15:13 +0100)]
Android hints: load the linux hints to get those defaults
Brian Fraser [Wed, 22 Jan 2014 19:45:10 +0000 (16:45 -0300)]
Android hints: Clean up some files if cross-compiling with adb
Brian Fraser [Wed, 22 Jan 2014 11:23:00 +0000 (08:23 -0300)]
Android hints: In native builds, add -L/system/lib to ldflags
This is just a safety net against the linker being weird.
Brian Fraser [Mon, 13 Jan 2014 02:56:47 +0000 (23:56 -0300)]
Configure, Android hints: Changes to allow native builds
Brian Fraser [Mon, 13 Jan 2014 03:10:32 +0000 (00:10 -0300)]
Android hints: When Configure finishes, turn $^O into 'android'
During Configure, we want it to be linux-android, so that
it'll also go through all of the linux checks.
Brian Fraser [Mon, 13 Jan 2014 00:10:11 +0000 (21:10 -0300)]
Android hints: Add m to libswanted
Brian Fraser [Sun, 12 Jan 2014 04:32:24 +0000 (01:32 -0300)]
Android hints: Set osvers to getprop ro.build.version.release
Brian Fraser [Fri, 25 Oct 2013 14:08:05 +0000 (11:08 -0300)]
Make compiling with adb work again
Brian Fraser [Sat, 12 Oct 2013 02:53:46 +0000 (23:53 -0300)]
Android hints: Only use adb if $targetrun is set to adb
This loses us some DWIMnery, but allows cross-compiling to
android using ssh, which is much easier to set up than getting
the SDK.
Brian Fraser [Wed, 21 Aug 2013 03:38:14 +0000 (00:38 -0300)]
Android hints: Only set userelocatableinc if it doesn't have a value
Without this, Configure would've bailed out if trying to build a
-Duseshrplib perl.
Brian Fraser [Sun, 11 Aug 2013 21:43:17 +0000 (18:43 -0300)]
hints/linux-androideabi.sh: If the host OS is darwin, set firstmakefile to GNUmakefile
Brian Fraser [Sun, 11 Aug 2013 21:38:05 +0000 (18:38 -0300)]
hints/linux-androideabi.sh: use $chmod instead of plain chmod
Brian Fraser [Sun, 11 Aug 2013 21:37:35 +0000 (18:37 -0300)]
hints/linux-androideabi.sh: use $cat instead of plain cat
Brian Fraser [Sun, 11 Aug 2013 21:30:18 +0000 (18:30 -0300)]
hints/linux-androideabi.sh: adb takes care of creating the target dir on the target
Brian Fraser [Sun, 11 Aug 2013 20:49:13 +0000 (17:49 -0300)]
hints/linux-androideabi.sh: sed might not understand "\r", use $tr instead
Brian Fraser [Fri, 9 Aug 2013 09:39:49 +0000 (06:39 -0300)]
hints/linux-androideabi.sh: Rather than relaying on adb, save the exit status in a file and then copy it over
Brian Fraser [Sat, 18 May 2013 02:14:49 +0000 (23:14 -0300)]
hints/linux-androideabi.sh: getservent_r() is a partial stub, mark it as undefined to avoid issues with threads
Brian Fraser [Wed, 15 May 2013 12:09:58 +0000 (09:09 -0300)]
android hints: Always define d_libname_unique
Brian Fraser [Sun, 28 Apr 2013 00:01:44 +0000 (21:01 -0300)]
Android hints: Detect stub functions and mark them as undefined.
Bionic implements several functions as stumps that simply warn
and return null, which leads to situations like this:
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378
This commit introduces some probes for functions (getnetbyname,
getnetbyaddr, getmntent, getprotobyname, getprotobynumber, endpwent,
ttyname) that we use and are actually stubs in at least some
versions of Android.
If we find a stub, we pretend that the function is undefined, so
the above example becomes this:
Unsupported socket function "getprotobyname" called at -e line 1.
Note that this commit does not fix the modules that assume that
these functions are always available, so 'make test' still fails.
Jess Robinson [Sat, 11 May 2013 13:37:39 +0000 (14:37 +0100)]
Correctly quote result from adb, otherwise multiline responses breal (eg signal_cmd)
Jess Robinson [Mon, 29 Apr 2013 08:54:35 +0000 (09:54 +0100)]
Android hints, run-ssh: Make sure that the stdout of commands run from Configure and Makefile on remote hosts is transfered back correctly
Jess Robinson [Fri, 19 Apr 2013 11:18:46 +0000 (12:18 +0100)]
No locales in Android, just set the lot to undef
Jess Robinson [Fri, 19 Apr 2013 11:00:14 +0000 (12:00 +0100)]
Android hints, run-adb-shell: Handle the -env switch
Currently, this is used during 'make test' to specify LD_LIBRARY_PATH
Jess Robinson [Thu, 31 Jan 2013 14:15:17 +0000 (14:15 +0000)]
Android hints: set targetsh to /system/bin/sh
Android, for reasons best known to itself, doesn't have a "/bin/sh" it
has a "/system/bin/sh". We need to run "/bin/sh" as $sh inside
./Configure on the host, but store a different path for use on the
actual Android system (eg by backticks, system etc, in SH_PATH).
The new variable is "targetsh" and defaults to "sh" unless changed by the hints file/Configure params.
Jess Robinson [Fri, 18 Jan 2013 18:55:02 +0000 (18:55 +0000)]
Create a Perl with relocatable inc when building for Android.
Jess Robinson [Fri, 4 Jan 2013 10:48:34 +0000 (10:48 +0000)]
Hints file for android cross-compiling.
The hints file names for cross-compiling (currently) need to match the prefix of the cross-compiler used.
Brian Fraser [Wed, 22 Jan 2014 22:33:51 +0000 (19:33 -0300)]
Linux hints: Improve the code that looks for libc.so
Brian Fraser [Wed, 22 Jan 2014 20:19:28 +0000 (17:19 -0300)]
Linux hints: Improve the portability of the -lndbm check
Brian Fraser [Wed, 22 Jan 2014 20:17:33 +0000 (17:17 -0300)]
Linux hints: add some missing $ccflags
Brian Fraser [Wed, 22 Jan 2014 20:14:59 +0000 (17:14 -0300)]
Linux hints: Handle `uname -m` in cross-compilation builds
Brian Fraser [Wed, 22 Jan 2014 20:13:25 +0000 (17:13 -0300)]
Linux hints: try using user-provided binaries before going for the defaults
This means that if the user called Configure with -Dnm=/foo/bar/nm, the
hints will try using that before going for plain 'nm'
Abigail [Sun, 26 Jan 2014 15:51:14 +0000 (16:51 +0100)]
Make it clear what it means if there's no distinction between -M and -m.
Triggered by perl #121078, where someone thought one could mimic the
behaviour of C<-m> by a clever use of C<-M> and C<=>.
Craig A. Berry [Sun, 26 Jan 2014 15:45:28 +0000 (09:45 -0600)]
targetsh in configure.com again
In
9056626be4b0df I had set it to empty string, but thanks to a
heads up from Brian Fraser I've realized it should be the same
thing as sh as it is now used to set up SH_PATH.
Craig A. Berry [Sat, 25 Jan 2014 20:48:51 +0000 (14:48 -0600)]
Fix targetsh in configure.com.
Specifically, there is no 'sh' variable, so if we try to reference
it we get:
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
\SH\
So enter an empty string for targetsh.
Craig A. Berry [Sat, 25 Jan 2014 16:50:02 +0000 (10:50 -0600)]
Make fileify handle node specifications better.
In particular, a node specification containing only a single
directory (i.e., node::dev:[dir]) was not being handled properly.
This came up while reproducing the problem in [perl #121002] but
was not the cause of that problem as the OP's directory had
multiple subdirectories in it.
Craig A. Berry [Sat, 25 Jan 2014 15:52:09 +0000 (09:52 -0600)]
In vms.c's Perl_opendir, skip access check on remotes.
As reported in [perl #121002], the homegrown opendir has been
failing when the directory specification contains a DECNet node
specification indicating the directory to be accessed is on a
remote node. The OP reports this worked with Perl 5.001 but not
5.8.6 or 5.18.2.
It appears that the culprit was the introduction of access
checking to Perl_opendir in
61bb59065bf1b12edab39b12, which would
first have been released in 5.004. Yes, it's been broken for 17
years.
The reason access checking broke remote access is that it's based
on SYS$CHECK_ACCESS, which apparently does not work on remotes,
though the only hint of that in its documentation is that the
status SS$_UNSUPPORTED, "Operations on remote object are not
supported" is listed as a possible return value. What it actually
returns, despite the documentation, is SS$_INVFILFOROP, "invalid
file specification for operation."
The fix is simple enough -- just skip the access check if the
directory name contains a node specification (which always ends
with "::"). All the access check is providing is a friendlier
error message in cases where we don't have access, so no harm is
done by skipping the check in cases where it can't work.
Yves Orton [Sat, 25 Jan 2014 15:48:56 +0000 (16:48 +0100)]
resolve bug 121070 - preserve $^R after successful match
We call LEAVE after successful eval matches, which clears $^R.
This changes a test that was added as part of handling bug 56194.
Brian Fraser [Sat, 25 Jan 2014 15:38:04 +0000 (12:38 -0300)]
Makefile.SH, make test: Copy config.sh when cross-compiling
t/TEST uses this to determine which extensions to run tests for;
if it's missing, it'll end up running everything, which means a ton of
failures from, say, Win32 and VMS if cross-compiling to Linux.
Brian Fraser [Wed, 13 Nov 2013 04:11:12 +0000 (01:11 -0300)]
t/porting/: Skips for cross-compilation
Chris 'BinGOs' Williams [Sat, 25 Jan 2014 13:38:10 +0000 (13:38 +0000)]
Update Module-Load to CPAN version 0.30
[DELTA]
0.30 Sat Jan 25 13:26:51 GMT 2014
* Fix 'uninitialized' warnings during testing
* Added done_testing() to tests
Chris 'BinGOs' Williams [Sat, 25 Jan 2014 13:37:15 +0000 (13:37 +0000)]
Update Module-Load-Conditional to CPAN version 0.62
[DELTA]
0.62 Fri Jan 24 15:52:44 GMT 2014
* Resolve test failures on v5.16.x
Chris 'BinGOs' Williams [Sat, 25 Jan 2014 13:35:57 +0000 (13:35 +0000)]
Update File-Fetch to CPAN version 0.48
[DELTA]
0.48 Fri Jan 24 10:32:52 2014
* Force curl to be IPv4 only during testing
on NetBSD
Brian Fraser [Fri, 17 Jan 2014 17:53:58 +0000 (14:53 -0300)]
File::Spec::Unix->tmpdir: Always return an absolute path
This is generally a non-issue, however, if /tmp doesn't exist
and $ENV{TMPDIR} isn't set, ->tmpdir() used to return ".", which
broke the following pattern:
use File::Temp qw(tempdir);
use File::Spec;
my $tmpdir = tempdir(CLEANUP => 1);
chdir $tmpdir;
my $file = File::Spec->catfile($tmpdir, "foo");
open my $fh, ">", $file or die $!;
Because $tmpdir would be something like 'bfhskjf94589', and after
the chdir, the open() would've tried to open $tmpdir/$tmpdir/foo.
Note that this is only the case when not running in taint mode. If taint
is enabled, ->tmpdir will still return '.'; this mirrors the behavior of
File::Temp.
Steve Hay [Fri, 24 Jan 2014 09:02:59 +0000 (09:02 +0000)]
Upgrade Scalar-List-Utils from version 1.37 to 1.38
Craig A. Berry [Fri, 24 Jan 2014 00:50:58 +0000 (18:50 -0600)]
Fix $ENV{PATH} flags in Peek.t.
Setting $ENV{PATH} explicitly in
bea5cecf09ba646ff0ff made us no
longer have the TEMP flag set on VMS, so make it optional.
Karl Williamson [Fri, 24 Jan 2014 01:04:41 +0000 (18:04 -0700)]
lib/locale.pm: Pod corrections
Karl Williamson [Wed, 22 Jan 2014 21:23:26 +0000 (14:23 -0700)]
Allow 'use locale' on systems without locales.
Instead of throwing an error, just go ahead and do the import.
This will tell Perl internally to use the current underlying locale,
which should be the C locale. Attempts to change the locale will fail.
This differs slightly from Brian Fraser's patch, in that his didn't
touch $^H, thus 'use locale' was a no-op. He has told me to apply this
one, which does affect $^H. The advantage here is that now programs
that are run on platforms with and without locales will behave
similarly, and should run identically if the locale is not switched from
the default.
Karl Williamson [Wed, 22 Jan 2014 21:42:10 +0000 (14:42 -0700)]
perllocale: Nit.
Brian Fraser [Thu, 23 Jan 2014 18:45:40 +0000 (19:45 +0100)]
perldelta for -Dtargetsh
Brian Fraser [Thu, 23 Jan 2014 18:05:18 +0000 (19:05 +0100)]
regen for uconfig.h
Brian Fraser [Thu, 23 Jan 2014 03:33:13 +0000 (00:33 -0300)]
Glossary entry for targetsh
Brian Fraser [Mon, 11 Nov 2013 20:16:58 +0000 (17:16 -0300)]
Added targetsh to all the canned config files
Jess Robinson [Thu, 31 Jan 2013 14:15:17 +0000 (14:15 +0000)]
Separate SH used to run Configure from SH used on target system
This is because, for example, on the host system, sh might be /bin/sh,
but on the target system, it's /system/bin/sh.
The new variable is "targetsh" and defaults to "sh" unless changed by the hints file/Configure params.
Karl Williamson [Thu, 23 Jan 2014 17:52:38 +0000 (10:52 -0700)]
loc_tools.pl: FIx to work on Android
Thanks to Brian Fraser for finding this and suggesting the kernel of
the patch.
The code to try to handle platforms without the POSIX module didn't work
properly. This code had just been moved, unchanged, here from
lib/locale.t; it never got executed previously due to a skip_all.
This patch also makes sure minitest doesn't fail, and adds some comments
Karl Williamson [Wed, 22 Jan 2014 05:17:20 +0000 (22:17 -0700)]
locale.c: Silence Win32 compiler warning.
This compiler is not smart enough to realize that overflow of a byte
can't occur here as the loop stops at 255.
Brian Fraser [Thu, 23 Jan 2014 17:52:39 +0000 (18:52 +0100)]
Configure: add missing ; to checkccflags
Brian Fraser [Thu, 23 Jan 2014 14:57:50 +0000 (15:57 +0100)]
handy.h: Move the _LC_CAST declaration.
Previous it was left so that some systems, like Android, didn't get this,
which broke the build.
Brian Fraser [Fri, 11 Oct 2013 22:30:56 +0000 (19:30 -0300)]
time64.h: On QNX, use const for tm_zone
http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/t/tm.html
Brian Fraser [Sat, 18 May 2013 02:20:07 +0000 (23:20 -0300)]
time64.h: Declare tm_zone as const under Android, but not if using C++
https://android.googlesource.com/platform/bionic.git/+/master/libc/include/time.h
Brian Fraser [Thu, 23 Jan 2014 01:46:07 +0000 (22:46 -0300)]
Merge branch 'cross-compile-revamp' into blead
This branch modifies how the cross-compilation model works.
The main change is that we now build a host miniperl to use locally,
rather than running each call to miniperl remotely.
It also removes several of the exceptions from the old model (no xlib,
xconfig.h, or Cross.pm).
Chris 'BinGOs' Williams [Wed, 22 Jan 2014 20:28:25 +0000 (20:28 +0000)]
Update IPC-Cmd to CPAN version 0.92
[DELTA]
0.92 Wed Jan 22 19:57:27 GMT 2014
Test fixes:
* Use File::Temp in run_forked tests (hugmeir)
Brian Fraser [Wed, 22 Jan 2014 17:23:51 +0000 (14:23 -0300)]
t/op/magic.t: Use three-arg open to avooid creating a subshell
Brian Fraser [Wed, 22 Jan 2014 14:20:59 +0000 (11:20 -0300)]
Add Darwin shared libraries (dylib) to gitignore
Brian Fraser [Thu, 10 Oct 2013 23:59:56 +0000 (20:59 -0300)]
ext/DynaLoader/t/DynaLoader.t: Skip the dl_findfile test when cross-compiling
Brian Fraser [Tue, 1 Oct 2013 13:35:41 +0000 (10:35 -0300)]
Moved a glob test from t/run/fresh_perl.t to t/op/glob.t
This was done because, currently, the test fails when cross-compiling
perl, but run/fresh_perl.t can't use Config to check if we're cross-
compiling.