summaryrefslogtreecommitdiff
path: root/ext/ExtUtils-Miniperl/lib
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-02-19 08:53:43 +0000
committerDavid Mitchell <davem@iabyn.com>2019-02-19 13:29:00 +0000
commitd6158b17934aab8f3f06ee6dd0a9fac0ac6940dd (patch)
tree89949920779aea18c81fbf18a4f45865012109bb /ext/ExtUtils-Miniperl/lib
parent04912be77a628a4643d16a99a332a73853926079 (diff)
downloadperl-d6158b17934aab8f3f06ee6dd0a9fac0ac6940dd.tar.gz
get MakeMaker to play under PERL_GLOBAL_STRUCT
Under PERL_GLOBAL_STRUCT (well, actually I've only tried under PERL_GLOBAL_STRUCT_PRIVATE), cpan/ExtUtils-MakeMaker/t/03-xsstatic.t was failing some tests. This was because it was creating a statically-linked perl binary, but wasn't compiling perlmain.c with -DPERL_CORE. Usually this doesn't matter, but under PERL_GLOBAL_STRUCT it needed a definition of aTHX which it was pulling from XSUB.h rather than perl.h, causing a SEGV. Until a proper fix makes it way into MakeMaker, explicitly define PERL_CORE in perlmain.c
Diffstat (limited to 'ext/ExtUtils-Miniperl/lib')
-rw-r--r--ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
index 6090970adc..46af2a6073 100644
--- a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
+++ b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
@@ -6,7 +6,7 @@ use ExtUtils::Embed 1.31, qw(xsi_header xsi_protos xsi_body);
our @ISA = qw(Exporter);
our @EXPORT = qw(writemain);
-our $VERSION = '1.08';
+our $VERSION = '1.09';
# blead will run this with miniperl, hence we can't use autodie or File::Temp
my $temp;
@@ -63,7 +63,7 @@ sub writemain{
*
* The content of the body of this generated file is mostly contained
* in Miniperl.pm - edit that file if you want to change anything.
- * miniperlmain.c is generated by running regen/miniperlmain.pl.pl, while
+ * miniperlmain.c is generated by running regen/miniperlmain.pl, while
* perlmain.c is built automatically by Makefile (so the former is
* included in the tarball while the latter isn't).
*/
@@ -78,6 +78,11 @@ sub writemain{
#endif
#define PERL_IN_MINIPERLMAIN_C
+
+/* work round bug in MakeMaker which doesn't currently (2019) supply this
+ * flag when making a statically linked perl */
+#define PERL_CORE 1
+
%s
static void xs_init (pTHX);
static PerlInterpreter *my_perl;