In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7a278470580a96e01c6545304d787761ea9d8c80?hp=a84e671a269f736a404a62f21caacc8a431c2aca>
- Log ----------------------------------------------------------------- commit 7a278470580a96e01c6545304d787761ea9d8c80 Author: Steve Hay <[email protected]> Date: Thu Jun 6 23:48:56 2013 +0100 Add a note to Win32's BUILD_STATIC configuration to include Win32CORE Win32CORE needs to be included for the on-demand loading of Win32 to work. (Many of Win32's Perl level functions are pre-defined (even without a "use Win32" statement), while the implementation is in a dynamically linked module.) M win32/Makefile M win32/makefile.mk commit a6c3746408c2badd5e2cc1a5be0adae06317533c Author: Steve Hay <[email protected]> Date: Thu Jun 6 23:43:33 2013 +0100 Exclude Compress/Raw/Bzip2 from ALL_STATIC extensions for MinGW for now The ALL_STATIC=define build succeeds with VC++, but with MinGW it gives an error about _BZ2_compressBlock (referenced from bzlib.o) being undefined. I do not know why, so just exclude this extension from the list for now, and add a note about it. M win32/makefile.mk commit aafd2430436dddf90c1453e446b7e8b7a773ffad Author: Steve Hay <[email protected]> Date: Thu Jun 6 23:35:55 2013 +0100 Simplify recipes for making perl-static.exe on Win32 There is no need to link the static extension libraries as well as the static perl library because the entire contents of all the static extension libraries have been put into the static perl library anyway. Also put the list of objects and libraries which perl.exe and perl-static.exe link against in the same order as each other, and in both makefiles, and (in makefile.mk) for both compilers, so that the similarities and differences are more readily seen. M win32/Makefile M win32/makefile.mk commit cc0b589ad6053fdbc488399fc8b8fe992abd9e3b Author: Steve Hay <[email protected]> Date: Thu Jun 6 23:28:07 2013 +0100 Fix creation of libperl519s.a on Win32 with MinGW The "ar rc" command created an invalid static perl library by putting the static extension libraries themselves into the library rather than putting the objects from each static extension library into it as intended (like the VC++ "link -lib" command does). We now extract each static extension library's objects into a temporary directory and put the objects from there into the static perl library. M win32/makefile.mk commit 056775f5f57d30cd2510ef7aeac19a96e8126feb Author: Steve Hay <[email protected]> Date: Thu Jun 6 23:14:09 2013 +0100 Remove /PDB:NONE linker option from Win32 makefiles The /PDB linker option syntax changed from /PDB:{filename|NONE} to just /PDB:filename from VC7 onwards. We do not use /PDB:NONE for most targets anyway, so just remove it from the one place it is present to avoid accidentally creating a file called "NONE" with all but VC6. M win32/Makefile M win32/makefile.mk commit eb4420e670a3282a9dd52476755bdf088f1f6cb7 Author: Steve Hay <[email protected]> Date: Thu Jun 6 23:05:05 2013 +0100 Ensure Win32 [nd]make builds the 'static' target when ALL_STATIC=define M win32/Makefile M win32/makefile.mk ----------------------------------------------------------------------- Summary of changes: win32/Makefile | 10 +++++----- win32/makefile.mk | 34 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/win32/Makefile b/win32/Makefile index 4f8898a..309ff19 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -553,7 +553,7 @@ CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl MINIMOD = ..\lib\ExtUtils\Miniperl.pm X2P = ..\x2p\a2p.exe GENUUDMAP = ..\generate_uudmap.exe -!IF "$(BUILD_STATIC)" == "define" +!IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define" PERLSTATIC = static !ELSE PERLSTATIC = @@ -777,7 +777,8 @@ SETARGV_OBJ = setargv$(o) STATIC_EXT = * !Win32 !SDBM_File !Encode !ELSE # specify static extensions here, for example: -#STATIC_EXT = Cwd Compress/Raw/Zlib +# (be sure to include Win32CORE to load Win32 on demand) +#STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib STATIC_EXT = Win32CORE !ENDIF @@ -1065,15 +1066,14 @@ perlmainst$(o) : perlmainst.c $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) \ - $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES) + $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ) $(EMBED_EXE_MANI) copy $(PERLEXE) $(WPERLEXE) $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) \ - @Extensions_static $(PERLSTATICLIB) /PDB:NONE \ - $(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES) + $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ) $(EMBED_EXE_MANI) MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs diff --git a/win32/makefile.mk b/win32/makefile.mk index edaf6cc..401fee5 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -641,12 +641,13 @@ MINIDIR = .\mini PERLEXE = ..\perl.exe WPERLEXE = ..\wperl.exe PERLEXESTATIC = ..\perl-static.exe +STATICDIR = .\static.tmp GLOBEXE = ..\perlglob.exe CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl MINIMOD = ..\lib\ExtUtils\Miniperl.pm X2P = ..\x2p\a2p.exe GENUUDMAP = ..\generate_uudmap.exe -.IF "$(BUILD_STATIC)" == "define" +.IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define" PERLSTATIC = static .ELSE PERLSTATIC = @@ -876,10 +877,15 @@ SETARGV_OBJ = setargv$(o) # - Win32 extension contains overlapped symbols with win32.c (BUG!) # - MakeMaker isn't capable enough for SDBM_File (smaller bug) # - Encode (encoding search algorithm relies on shared library?) +# - GCC's linker gets undefined reference to _BZ2_compressBlock STATIC_EXT = * !Win32 !SDBM_File !Encode +.IF "$(CCTYPE)" == "GCC" +STATIC_EXT += !Compress/Raw/Bzip2 +.ENDIF .ELSE # specify static extensions here, for example: -#STATIC_EXT = Cwd Compress/Raw/Zlib +# (be sure to include Win32CORE to load Win32 on demand) +#STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib STATIC_EXT = Win32CORE .ENDIF @@ -1154,16 +1160,13 @@ $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static .ENDIF $(XCOPY) $(PERLIMPLIB) $(COREDIR) -$(PERLSTATICLIB): Extensions_static +$(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static .IF "$(CCTYPE)" == "GCC" -# XXX: It would be nice if MinGW's ar accepted a temporary file, but this -# doesn't seem to work: -# $(LIB32) $(LIB_FLAGS) $@ \ -# $(mktmp $(LKPRE) $(shell @type Extensions_static) \ -# $(PERLDLL_OBJ) $(LKPOST)) - $(LIB32) $(LIB_FLAGS) $@ \ - $(shell @type Extensions_static) \ - $(PERLDLL_OBJ) + if exist $(STATICDIR) rmdir /s /q $(STATICDIR) + mkdir $(STATICDIR) + cd $(STATICDIR) && for %i in ($(shell @type Extensions_static)) do $(ARCHPREFIX)ar x ..\%i + $(LIB32) $(LIB_FLAGS) $@ $(STATICDIR)\*$(o) $(PERLDLL_OBJ) + rmdir /s /q $(STATICDIR) .ELSE $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \ @$(mktmp $(PERLDLL_OBJ)) @@ -1239,7 +1242,7 @@ $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) .ELSE $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \ - $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES) + $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ) $(EMBED_EXE_MANI) .ENDIF copy $(PERLEXE) $(WPERLEXE) @@ -1248,13 +1251,10 @@ $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) .IF "$(CCTYPE)" == "GCC" $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ - $(mktmp $(LKPRE) $(shell @type Extensions_static) \ - $(PERLSTATICLIB) $(LIBFILES) $(PERLEXEST_OBJ) \ - $(PERLEXE_RES) $(LKPOST)) + $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) .ELSE $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \ - @Extensions_static $(PERLSTATICLIB) /PDB:NONE \ - $(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES) + $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ) $(EMBED_EXE_MANI) .ENDIF -- Perl5 Master Repository
