all extensions statically (into perl519.dll, and into a separate
perl-static.exe too) were broken for MinGW builds. This has now been fixed.
-The ALL_STATIC option has also been improved to include the Win32 extension,
-and also the Encode extension for VC++ builds. (However, Encode and
-Compress/Raw/Bzip2 are currently still excluded from MinGW builds. This will
-hopefully be rectified soon.)
+The ALL_STATIC option has also been improved to include the Encode and Win32
+extensions (for both VC++ and MinGW builds).
=back
.IF "$(ALL_STATIC)" == "define"
# some exclusions, unfortunately, until fixed:
# - MakeMaker isn't capable enough for SDBM_File (small bug)
-# - GCC's linker gets undefined references to _BZ2_compressBlock and
-# _cp936_encoding, _cp932_encoding and others in Encode/CN.o and Encode/JP.o
STATIC_EXT = * !SDBM_File
-.IF "$(CCTYPE)" == "GCC"
-STATIC_EXT += !Compress/Raw/Bzip2 !Encode
-.ENDIF
.ELSE
# specify static extensions here, for example:
# (be sure to include Win32CORE to load Win32 on demand)
$(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
.IF "$(CCTYPE)" == "GCC"
+ $(LIB32) $(LIB_FLAGS) $@ $(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)
+ for %i in ($(shell @type Extensions_static)) do \
+ @mkdir $(STATICDIR) && cd $(STATICDIR) && \
+ $(ARCHPREFIX)ar x ..\%i && \
+ $(ARCHPREFIX)ar q ..\$@ *$(o) && \
+ cd .. && rmdir /s /q $(STATICDIR)
.ELSE
$(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
@$(mktmp $(PERLDLL_OBJ))