Jrobinson/configure for cross #2

wants to merge 17 commits into


None yet

2 participants


Revised pull request for the correct branch with what should be a sane diff.

and others added some commits Oct 19, 2012
@castaway Introduce sysroot variable to Configure
This is borrowed from gcc and allows us to indicate the logical root
directory for headers and libraries, under which all -I and -L are
searched for. This patch adjusts Configure to search under $sysroot
(if supplied) for headers and libraries, instead of /.

$libsearchpth is also introduced to track the absolute paths of
found libraries. $libpath continues to list the relative paths to
pass to -L.
@castaway Pass the --sysroot flag to the compiler, if -Dsysroot= is used.
This is a preparation step for better Cross-Compiling support.
@castaway Use the pure "sysroot" value from $Config to lookup sysroot path.
Useful in cross-compiling.
@castaway Rollback sysrootflag idea, add --sysroot to ccflags etc so that make …
…in ExtUtils::MakeMaker etc will use it
@castaway Revamp usecrosscompile section.
Use sysroot for libpath/incpath if set.
Set to/from/run scripts if targethost is passed, regardless of whether we are cross compiling
@castaway Set appropriate flags for linux or linux-like systems. 52a7aad
@castaway Add missing $run prefix to some Configure tests 2031889
@castaway Stop using $run for anything other than testing compiled tests in Con…

(When cross-compiling we want to run miniperl etc on the compile host, not the test target)
@castaway No xconfig.h is produced when cross-compiling, we have a normal config.h b91e907
@castaway Setup $^O to be the target os when building Core.
This allows the correct hints files to be loaded when building modules
@castaway Stop using Config{run} to check the version of (mini)perl we are running d3d54d4
@castaway Build host miniperl and generate_uudmap binaries when cross compiling…
…, for local use
@castaway Hints file for android cross-compiling.
The hints file names for cross-compiling (currently) need to match the prefix of the cross-compiler used.
@codehelp codehelp apply changes to avoid bashisms in Configure cf3f065
@codehelp codehelp add an escape for when targethost is not defined but usecrosscompile is. b7a4b5f
@codehelp codehelp fix the ability to use targethost when defined. 9f02fa0
@codehelp codehelp Let the targethost copy operation repeat as the flag file does not ge…
…t removed.


@castaway castaway closed this Jan 18, 2013
@castaway castaway pushed a commit that referenced this pull request Apr 24, 2013
@demerphq demerphq rework split() special case interaction with regex engine
This patch resolves several issues at once. The parts are
sufficiently interconnected that it is hard to break it down
into smaller commits. The tickets open for these issues are:

  RT #94490  - split and constant folding
  RT #116086 - split "\x20" doesn't work as documented

It additionally corrects some issues with cached regexes that
were exposed by the split changes (and applied to them).

It effectively reverts 5255171
and cccd142.

Prior to this patch the special RXf_SKIPWHITE behavior of

    split(" ", $thing)

was only available if Perl could resolve the first argument to
split at compile time, meaning under various arcane situations.

This manifested as oddities like

    my $delim = $cond ? " " : qr/\s+/;
    split $delim, $string;


    split $cond ? " ", qr/\s+/, $string

not behaving the same as:

    ($cond ? split(" ", $string) : split(/\s+/, $string))

which isn't very convenient.

This patch changes this by adding a new flag to the op_pmflags,
PMf_SPLIT which enables pp_regcomp() to know whether it was called
as part of split, which allows the RXf_SPLIT to be passed into run
time regex compilation. We also preserve the original flags so
pattern caching works properly, by adding a new property to the
regexp structure, "compflags", and related macros for accessing it.
We preserve the original flags passed into the compilation process,
so we can compare when we are trying to decide if we need to

Note that this essentially the opposite fix from the one applied
originally to fix #94490 in 5255171.
The reverted patch was meant to make:

        split( 0 || " ", $thing )            #1

consistent with

        my $x=0; split( $x || " ", $thing )  #2

and not with

        split( " ", $thing )                 #3

This was reverted because it broke C<split("\x{20}", $thing)>, and
because one might argue that is not that #1 does the wrong thing,
but rather that the behavior of #2 that is wrong. In other words
we might expect that all three should behave the same as #3, and
that instead of "fixing" the behavior of #1 to be like #2, we should
really fix the behavior of #2 to behave like #3. (Which is what we did.)

Also, it doesn't make sense to move the special case detection logic
further from the regex engine. We really want the regex engine to decide
this stuff itself, otherwise split " ", ... wouldn't work properly with
an alternate engine. (Imagine we add a special regexp meta pattern that behaves
the same as " " does in a split /.../. For instance we might make
split /(*SPLITWHITE)/ trigger the same behavior as split " ".

The other major change as result of this patch is it effectively
reverts commit cccd142, which
was intended to get rid of RXf_SPLIT and RXf_SKIPWHITE, which
and free up bits in the regex flags structure.

But we dont want to get rid of these vars, and it turns out that
RXf_SEEN_LOOKBEHIND is used only in the same situation as the new
RXf_NO_INPLACE_SUBST, and then instead of using two vars we use
only the one. Which in turn allows RXf_SPLIT and RXf_SKIPWHITE to
have their bits back.
@castaway castaway pushed a commit that referenced this pull request Oct 10, 2013
@JohnPeacock @steve-m-hay JohnPeacock + steve-m-hay PATCH: Synchronize version.pm CPAN with core
Date: Fri, 16 Aug 2013 08:59:49 -0400
Message-ID: <520E2245.3020309@havurah-software.org>

(Amended by the committer to preserve local changes in 07locale.t from
3fca3d6 (the first part of hunk #2 is not
in 0.9903) and 02aba72 (not in 0.9903 at
all), and to fix a "tab after spaces" problem in version.pm. These changes
are being sent back upstream in CPAN RT#87513.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment