Permalink
Browse files

No need for makedef.pl to invoke $^X -V to get 'Compile-time options'.

Config now exposes this as Config::bincompat_options() and
Config::non_bincompat_options().

Change WinCE to invoke makedef.pl with -MCross, which it should have been using
all along, as the values it wants are from the host config, not the target
config. [Not tested on WinCE]. Previously makedef.pl would have been loading
the target config, but as it was only using $Config{path_sep}, this would not
have mattered.
  • Loading branch information...
Nicholas Clark
Nicholas Clark committed Jul 17, 2011
1 parent e95aa0c commit e9cefc111f9de79d56470a93e2665790775a1a3a
Showing with 6 additions and 13 deletions.
  1. +5 −12 makedef.pl
  2. +1 −1 win32/Makefile.ce
View
@@ -77,18 +77,11 @@
# source files and header files and don't include any BUILDOPT's that
# the user might have chosen to disable because the canned configs are
# minimal configs that don't include any of those options.
- my $opts = ($PLATFORM eq 'wince' ? '-MCross' : ''); # for wince need Cross.pm to get Config.pm
-
- $ENV{PERL5LIB} = join $Config{path_sep}, @INC;
- my $cmd = "$^X $opts -V";
- my $config = `$cmd`
- or die "Couldn't run [$cmd]: $!";
- my($options) = $config =~ /^ Compile-time options: (.*?)\n^ \S/ms;
- $options =~ s/\s+/ /g;
- print STDERR "Options: ($options)\n";
- foreach (split /\s+/, $options) {
- $define{$_} = 1;
- }
+
+ my @options
+ = sort(Config::bincompat_options(), Config::non_bincompat_options());
+ print STDERR "Options: (@options)\n";
+ $define{$_} = 1 foreach @options;
}
my %exportperlmalloc =
View
@@ -847,7 +847,7 @@ $(DLLDIR)\perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
perldll.def : $(HPERL) $(CONFIGPM) ..\global.sym ..\makedef.pl create_perllibst_h.pl
$(HPERL) -MCross -I..\lib create_perllibst_h.pl
- $(HPERL) -w ..\makedef.pl PLATFORM=wince $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
+ $(HPERL) -MCross -w ..\makedef.pl PLATFORM=wince $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
CCTYPE=$(CCTYPE) -DPERL_DLL=$(PERLDLL) TARG_DIR=..\ > perldll.def
$(PERLDLL) : $(DLLDIR) perldll.def $(XDLLOBJS) $(PERLDLL_RES)

0 comments on commit e9cefc1

Please sign in to comment.