diff options
author | Vadim Konovalov <vkonovalov@lucent.com> | 2004-10-13 13:45:31 +0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-10-14 14:01:50 +0000 |
commit | 8bcd5811450ad13819564acc4bb15a205239031f (patch) | |
tree | 1ec5f2c8dceb0804d3792471b82975aad03261a2 /win32 | |
parent | 90f6ca78c85ab94ac108f3fd8202d56948c025be (diff) | |
download | perl-8bcd5811450ad13819564acc4bb15a205239031f.tar.gz |
RE: [PATCH-for-23358] enable statically linked exte nsions for Win32
From: "Konovalov, Vadim" <vkonovalov@spb.lucent.com>
Message-ID: <7DD1BE2C50259746ABB8683672D2089E08133C@itotest-1.spb.lucent.com>
p4raw-id: //depot/perl@23363
Diffstat (limited to 'win32')
-rw-r--r-- | win32/buildext.pl | 8 | ||||
-rw-r--r-- | win32/makefile.mk | 31 |
2 files changed, 32 insertions, 7 deletions
diff --git a/win32/buildext.pl b/win32/buildext.pl index 50fe4c1d97..0ae9f74173 100644 --- a/win32/buildext.pl +++ b/win32/buildext.pl @@ -60,7 +60,13 @@ if ($opts{'list-static-libs'} || $opts{'create-perllibst-h'}) { print $fh "#ifdef STATIC3\n",(map {" newXS(\"$statics2[$_]::bootstrap\", boot_$statics1[$_], file);\n"} 0 .. $#statics),"#undef STATIC3\n#endif\n"; } else { - print map {/([^\/]+)$/;"$_/$1.lib "} @statics; + my %extralibs; + for (@statics) { + open my $fh, "<..\\lib\\auto\\$_\\extralibs.ld" or die "can't open <..\\lib\\auto\\$_\\extralibs.ld: $!"; + $extralibs{$_}++ for grep {/\S/} split /\s+/, join '', <$fh>; + } + print map {/([^\/]+)$/;"..\\lib\\auto\\$_/$1.lib "} @statics; + print map {"$_ "} sort keys %extralibs; } exit; } diff --git a/win32/makefile.mk b/win32/makefile.mk index e030f2b349..1117f28d9a 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -155,7 +155,14 @@ CRYPT_SRC *= fcrypt.c # extensions if you change the default. Currently, this cannot be enabled # if you ask for USE_IMP_SYS above. # -#PERL_MALLOC *= define +PERL_MALLOC *= define + +# +# set this to enable debugging mstats +# This must be enabled to use the Devel::Peek::mstat() function. This cannot +# be enabled without PERL_MALLOC as well. +# +DEBUG_MSTATS = define # # set the install locations of the compiler include/libraries @@ -239,6 +246,19 @@ USE_PERLIO *= undef USE_LARGE_FILES *= undef USE_PERLCRT *= undef +.IF "$(PERL_MALLOC)" == "undef" +PERL_MALLOC = undef +DEBUG_MSTATS = undef +.ENDIF + +.IF "$(DEBUG_MSTATS)" == "undef" +DEBUG_MSTATS = undef +.ENDIF + +.IF "$(DEBUG_MSTATS)" == "define" +BUILDOPT += -DPERL_DEBUGGING_MSTATS +.ENDIF + .IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef" USE_MULTI != define .ENDIF @@ -1035,10 +1055,9 @@ $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static perl.exp $(LKPOST)) .ELSE $(LINK32) -dll -def:perldll.def -out:$@ \ - -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \ - $(foreach,i,$(shell $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --list-static-libs) \ - ..\lib\auto\$i) \ - $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\) + $(shell $(MINIPERL) -I..\lib buildext.pl --list-static-libs) \ + @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \ + $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\)) .ENDIF $(XCOPY) $(PERLIMPLIB) $(COREDIR) @@ -1121,7 +1140,7 @@ Extensions : buildext.pl $(PERLDEP) $(CONFIGPM) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic -Extensions_static : buildext.pl $(PERLDEP) $(CONFIGPM) +Extensions_static : buildext.pl $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static |