Fossil SCM

For the MSVC makefile, fix forwarding of XPCFLAGS and XPLDFLAGS to OpenSSL. This is only relevant if the MSVC makefile is used to build OpenSSL as a sub-project (FOSSIL_BUILD_SSL=1) for Windows XP (FOSSIL_ENABLE_WINXP=1). XPLDFLAGS only matters for the shared library case (FOSSIL_DYNAMIC_BUILD=1), and is applied in a post build step -- somewhat whacky, but fixes the problem, and there's a lot of comments and diagnostic output to help with troubleshooting.

florian 2022-01-31 05:41 trunk merge
Commit fa3f60f694918d87fe17f240cc0fcd5c2b1b4dc295b50e96fc9811d40ecde00b
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -1574,11 +1574,10 @@
15741574
!if $(FOSSIL_DYNAMIC_BUILD)!=0
15751575
SSLLIBDIR = $(SSLDIR)
15761576
!else
15771577
SSLLIBDIR = $(SSLDIR)
15781578
!endif
1579
-SSLLFLAGS = /nologo /opt:ref /debug
15801579
SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
15811580
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
15821581
!message Using 'x64' platform for OpenSSL...
15831582
SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
15841583
!if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -1646,16 +1645,27 @@
16461645
!endif
16471646
16481647
!if $(FOSSIL_ENABLE_WINXP)!=0
16491648
XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
16501649
CFLAGS = $(CFLAGS) $(XPCFLAGS)
1650
+#
1651
+# NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
1652
+# explicit initialization is redundant, but is required for post-built edits.
1653
+#
16511654
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1652
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1655
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
16531656
!else
1654
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1657
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
16551658
!endif
16561659
LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1660
+#
1661
+# NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
1662
+# is applied in a separate post-build step, see below for more information.
1663
+#
1664
+!if $(FOSSIL_ENABLE_SSL)!=0
1665
+SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
1666
+!endif
16571667
!endif
16581668
16591669
!if $(FOSSIL_DYNAMIC_BUILD)!=0
16601670
!if $(DEBUG)!=0
16611671
CRTFLAGS = /MDd
@@ -1831,19 +1841,42 @@
18311841
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
18321842
18331843
!if $(FOSSIL_ENABLE_SSL)!=0
18341844
openssl:
18351845
@echo Building OpenSSL from "$(SSLDIR)"...
1846
+!if $(FOSSIL_ENABLE_WINXP)!=0
1847
+ @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
1848
+!endif
18361849
!ifdef PERLDIR
18371850
@pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
18381851
!else
18391852
@pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
18401853
!endif
1841
-!if $(FOSSIL_ENABLE_WINXP)!=0
1842
- @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
1843
-!else
18441854
@pushd "$(SSLDIR)" && $(MAKE) && popd
1855
+!if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
1856
+#
1857
+# NOTE: Appending custom linker flags to the OpenSSL default linker flags is
1858
+# somewhat difficult, as summarized in this Fossil Forum post:
1859
+#
1860
+# https://fossil-scm.org/forum/forumpost/a9a2d6af28b
1861
+#
1862
+# Therefore the custom linker flags required for Windows XP dynamic builds are
1863
+# applied in a separate post-build step.
1864
+#
1865
+# If the build stops here, or if the custom linker flags are outside the scope
1866
+# of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
1867
+# the OpenSSL makefile by hand.
1868
+#
1869
+# Also note that this step changes the subsystem for the OpenSSL DLLs from
1870
+# WINDOWS to CONSOLE, but which has no effect on DLLs.
1871
+#
1872
+ @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
1873
+ @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) <<<NEXT_LINE>>>
1874
+ do @( <<<NEXT_LINE>>>
1875
+ echo %F & <<<NEXT_LINE>>>
1876
+ link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 <<<NEXT_LINE>>>
1877
+ )
18451878
!endif
18461879
18471880
clean-openssl:
18481881
@pushd "$(SSLDIR)" && $(MAKE) clean && popd
18491882
!endif
18501883
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -1574,11 +1574,10 @@
1574 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1575 SSLLIBDIR = $(SSLDIR)
1576 !else
1577 SSLLIBDIR = $(SSLDIR)
1578 !endif
1579 SSLLFLAGS = /nologo /opt:ref /debug
1580 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
1581 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1582 !message Using 'x64' platform for OpenSSL...
1583 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
1584 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -1646,16 +1645,27 @@
1646 !endif
1647
1648 !if $(FOSSIL_ENABLE_WINXP)!=0
1649 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
1650 CFLAGS = $(CFLAGS) $(XPCFLAGS)
 
 
 
 
1651 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1652 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1653 !else
1654 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1655 !endif
1656 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
 
 
 
 
 
 
 
1657 !endif
1658
1659 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1660 !if $(DEBUG)!=0
1661 CRTFLAGS = /MDd
@@ -1831,19 +1841,42 @@
1831 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
1832
1833 !if $(FOSSIL_ENABLE_SSL)!=0
1834 openssl:
1835 @echo Building OpenSSL from "$(SSLDIR)"...
 
 
 
1836 !ifdef PERLDIR
1837 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
1838 !else
1839 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
1840 !endif
1841 !if $(FOSSIL_ENABLE_WINXP)!=0
1842 @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
1843 !else
1844 @pushd "$(SSLDIR)" && $(MAKE) && popd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1845 !endif
1846
1847 clean-openssl:
1848 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
1849 !endif
1850
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -1574,11 +1574,10 @@
1574 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1575 SSLLIBDIR = $(SSLDIR)
1576 !else
1577 SSLLIBDIR = $(SSLDIR)
1578 !endif
 
1579 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
1580 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1581 !message Using 'x64' platform for OpenSSL...
1582 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
1583 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -1646,16 +1645,27 @@
1645 !endif
1646
1647 !if $(FOSSIL_ENABLE_WINXP)!=0
1648 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
1649 CFLAGS = $(CFLAGS) $(XPCFLAGS)
1650 #
1651 # NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
1652 # explicit initialization is redundant, but is required for post-built edits.
1653 #
1654 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1655 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
1656 !else
1657 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
1658 !endif
1659 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1660 #
1661 # NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
1662 # is applied in a separate post-build step, see below for more information.
1663 #
1664 !if $(FOSSIL_ENABLE_SSL)!=0
1665 SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
1666 !endif
1667 !endif
1668
1669 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1670 !if $(DEBUG)!=0
1671 CRTFLAGS = /MDd
@@ -1831,19 +1841,42 @@
1841 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
1842
1843 !if $(FOSSIL_ENABLE_SSL)!=0
1844 openssl:
1845 @echo Building OpenSSL from "$(SSLDIR)"...
1846 !if $(FOSSIL_ENABLE_WINXP)!=0
1847 @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
1848 !endif
1849 !ifdef PERLDIR
1850 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
1851 !else
1852 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
1853 !endif
 
 
 
1854 @pushd "$(SSLDIR)" && $(MAKE) && popd
1855 !if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
1856 #
1857 # NOTE: Appending custom linker flags to the OpenSSL default linker flags is
1858 # somewhat difficult, as summarized in this Fossil Forum post:
1859 #
1860 # https://fossil-scm.org/forum/forumpost/a9a2d6af28b
1861 #
1862 # Therefore the custom linker flags required for Windows XP dynamic builds are
1863 # applied in a separate post-build step.
1864 #
1865 # If the build stops here, or if the custom linker flags are outside the scope
1866 # of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
1867 # the OpenSSL makefile by hand.
1868 #
1869 # Also note that this step changes the subsystem for the OpenSSL DLLs from
1870 # WINDOWS to CONSOLE, but which has no effect on DLLs.
1871 #
1872 @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
1873 @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) <<<NEXT_LINE>>>
1874 do @( <<<NEXT_LINE>>>
1875 echo %F & <<<NEXT_LINE>>>
1876 link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 <<<NEXT_LINE>>>
1877 )
1878 !endif
1879
1880 clean-openssl:
1881 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
1882 !endif
1883
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -1574,11 +1574,10 @@
15741574
!if $(FOSSIL_DYNAMIC_BUILD)!=0
15751575
SSLLIBDIR = $(SSLDIR)
15761576
!else
15771577
SSLLIBDIR = $(SSLDIR)
15781578
!endif
1579
-SSLLFLAGS = /nologo /opt:ref /debug
15801579
SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
15811580
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
15821581
!message Using 'x64' platform for OpenSSL...
15831582
SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
15841583
!if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -1646,16 +1645,27 @@
16461645
!endif
16471646
16481647
!if $(FOSSIL_ENABLE_WINXP)!=0
16491648
XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
16501649
CFLAGS = $(CFLAGS) $(XPCFLAGS)
1650
+#
1651
+# NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
1652
+# explicit initialization is redundant, but is required for post-built edits.
1653
+#
16511654
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1652
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1655
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
16531656
!else
1654
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1657
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
16551658
!endif
16561659
LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1660
+#
1661
+# NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
1662
+# is applied in a separate post-build step, see below for more information.
1663
+#
1664
+!if $(FOSSIL_ENABLE_SSL)!=0
1665
+SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
1666
+!endif
16571667
!endif
16581668
16591669
!if $(FOSSIL_DYNAMIC_BUILD)!=0
16601670
!if $(DEBUG)!=0
16611671
CRTFLAGS = /MDd
@@ -1831,19 +1841,42 @@
18311841
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
18321842
18331843
!if $(FOSSIL_ENABLE_SSL)!=0
18341844
openssl:
18351845
@echo Building OpenSSL from "$(SSLDIR)"...
1846
+!if $(FOSSIL_ENABLE_WINXP)!=0
1847
+ @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
1848
+!endif
18361849
!ifdef PERLDIR
18371850
@pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
18381851
!else
18391852
@pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
18401853
!endif
1841
-!if $(FOSSIL_ENABLE_WINXP)!=0
1842
- @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
1843
-!else
18441854
@pushd "$(SSLDIR)" && $(MAKE) && popd
1855
+!if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
1856
+#
1857
+# NOTE: Appending custom linker flags to the OpenSSL default linker flags is
1858
+# somewhat difficult, as summarized in this Fossil Forum post:
1859
+#
1860
+# https://fossil-scm.org/forum/forumpost/a9a2d6af28b
1861
+#
1862
+# Therefore the custom linker flags required for Windows XP dynamic builds are
1863
+# applied in a separate post-build step.
1864
+#
1865
+# If the build stops here, or if the custom linker flags are outside the scope
1866
+# of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
1867
+# the OpenSSL makefile by hand.
1868
+#
1869
+# Also note that this step changes the subsystem for the OpenSSL DLLs from
1870
+# WINDOWS to CONSOLE, but which has no effect on DLLs.
1871
+#
1872
+ @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
1873
+ @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) <<<NEXT_LINE>>>
1874
+ do @( <<<NEXT_LINE>>>
1875
+ echo %F & <<<NEXT_LINE>>>
1876
+ link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 <<<NEXT_LINE>>>
1877
+ )
18451878
!endif
18461879
18471880
clean-openssl:
18481881
@pushd "$(SSLDIR)" && $(MAKE) clean && popd
18491882
!endif
18501883
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -1574,11 +1574,10 @@
1574 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1575 SSLLIBDIR = $(SSLDIR)
1576 !else
1577 SSLLIBDIR = $(SSLDIR)
1578 !endif
1579 SSLLFLAGS = /nologo /opt:ref /debug
1580 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
1581 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1582 !message Using 'x64' platform for OpenSSL...
1583 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
1584 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -1646,16 +1645,27 @@
1646 !endif
1647
1648 !if $(FOSSIL_ENABLE_WINXP)!=0
1649 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
1650 CFLAGS = $(CFLAGS) $(XPCFLAGS)
 
 
 
 
1651 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1652 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1653 !else
1654 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1655 !endif
1656 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
 
 
 
 
 
 
 
1657 !endif
1658
1659 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1660 !if $(DEBUG)!=0
1661 CRTFLAGS = /MDd
@@ -1831,19 +1841,42 @@
1831 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
1832
1833 !if $(FOSSIL_ENABLE_SSL)!=0
1834 openssl:
1835 @echo Building OpenSSL from "$(SSLDIR)"...
 
 
 
1836 !ifdef PERLDIR
1837 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
1838 !else
1839 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
1840 !endif
1841 !if $(FOSSIL_ENABLE_WINXP)!=0
1842 @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
1843 !else
1844 @pushd "$(SSLDIR)" && $(MAKE) && popd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1845 !endif
1846
1847 clean-openssl:
1848 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
1849 !endif
1850
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -1574,11 +1574,10 @@
1574 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1575 SSLLIBDIR = $(SSLDIR)
1576 !else
1577 SSLLIBDIR = $(SSLDIR)
1578 !endif
 
1579 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
1580 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1581 !message Using 'x64' platform for OpenSSL...
1582 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
1583 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -1646,16 +1645,27 @@
1645 !endif
1646
1647 !if $(FOSSIL_ENABLE_WINXP)!=0
1648 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
1649 CFLAGS = $(CFLAGS) $(XPCFLAGS)
1650 #
1651 # NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
1652 # explicit initialization is redundant, but is required for post-built edits.
1653 #
1654 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1655 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
1656 !else
1657 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
1658 !endif
1659 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1660 #
1661 # NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
1662 # is applied in a separate post-build step, see below for more information.
1663 #
1664 !if $(FOSSIL_ENABLE_SSL)!=0
1665 SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
1666 !endif
1667 !endif
1668
1669 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1670 !if $(DEBUG)!=0
1671 CRTFLAGS = /MDd
@@ -1831,19 +1841,42 @@
1841 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
1842
1843 !if $(FOSSIL_ENABLE_SSL)!=0
1844 openssl:
1845 @echo Building OpenSSL from "$(SSLDIR)"...
1846 !if $(FOSSIL_ENABLE_WINXP)!=0
1847 @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
1848 !endif
1849 !ifdef PERLDIR
1850 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
1851 !else
1852 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
1853 !endif
 
 
 
1854 @pushd "$(SSLDIR)" && $(MAKE) && popd
1855 !if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
1856 #
1857 # NOTE: Appending custom linker flags to the OpenSSL default linker flags is
1858 # somewhat difficult, as summarized in this Fossil Forum post:
1859 #
1860 # https://fossil-scm.org/forum/forumpost/a9a2d6af28b
1861 #
1862 # Therefore the custom linker flags required for Windows XP dynamic builds are
1863 # applied in a separate post-build step.
1864 #
1865 # If the build stops here, or if the custom linker flags are outside the scope
1866 # of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
1867 # the OpenSSL makefile by hand.
1868 #
1869 # Also note that this step changes the subsystem for the OpenSSL DLLs from
1870 # WINDOWS to CONSOLE, but which has no effect on DLLs.
1871 #
1872 @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
1873 @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) <<<NEXT_LINE>>>
1874 do @( <<<NEXT_LINE>>>
1875 echo %F & <<<NEXT_LINE>>>
1876 link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 <<<NEXT_LINE>>>
1877 )
1878 !endif
1879
1880 clean-openssl:
1881 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
1882 !endif
1883
+39 -6
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -116,11 +116,10 @@
116116
!if $(FOSSIL_DYNAMIC_BUILD)!=0
117117
SSLLIBDIR = $(SSLDIR)
118118
!else
119119
SSLLIBDIR = $(SSLDIR)
120120
!endif
121
-SSLLFLAGS = /nologo /opt:ref /debug
122121
SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
123122
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
124123
!message Using 'x64' platform for OpenSSL...
125124
SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
126125
!if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -188,16 +187,27 @@
188187
!endif
189188
190189
!if $(FOSSIL_ENABLE_WINXP)!=0
191190
XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
192191
CFLAGS = $(CFLAGS) $(XPCFLAGS)
192
+#
193
+# NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
194
+# explicit initialization is redundant, but is required for post-built edits.
195
+#
193196
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
194
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
197
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
195198
!else
196
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
199
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
197200
!endif
198201
LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
202
+#
203
+# NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
204
+# is applied in a separate post-build step, see below for more information.
205
+#
206
+!if $(FOSSIL_ENABLE_SSL)!=0
207
+SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
208
+!endif
199209
!endif
200210
201211
!if $(FOSSIL_DYNAMIC_BUILD)!=0
202212
!if $(DEBUG)!=0
203213
CRTFLAGS = /MDd
@@ -795,19 +805,42 @@
795805
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
796806
797807
!if $(FOSSIL_ENABLE_SSL)!=0
798808
openssl:
799809
@echo Building OpenSSL from "$(SSLDIR)"...
810
+!if $(FOSSIL_ENABLE_WINXP)!=0
811
+ @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
812
+!endif
800813
!ifdef PERLDIR
801814
@pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
802815
!else
803816
@pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
804817
!endif
805
-!if $(FOSSIL_ENABLE_WINXP)!=0
806
- @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
807
-!else
808818
@pushd "$(SSLDIR)" && $(MAKE) && popd
819
+!if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
820
+#
821
+# NOTE: Appending custom linker flags to the OpenSSL default linker flags is
822
+# somewhat difficult, as summarized in this Fossil Forum post:
823
+#
824
+# https://fossil-scm.org/forum/forumpost/a9a2d6af28b
825
+#
826
+# Therefore the custom linker flags required for Windows XP dynamic builds are
827
+# applied in a separate post-build step.
828
+#
829
+# If the build stops here, or if the custom linker flags are outside the scope
830
+# of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
831
+# the OpenSSL makefile by hand.
832
+#
833
+# Also note that this step changes the subsystem for the OpenSSL DLLs from
834
+# WINDOWS to CONSOLE, but which has no effect on DLLs.
835
+#
836
+ @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
837
+ @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) \
838
+ do @( \
839
+ echo %F & \
840
+ link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 \
841
+ )
809842
!endif
810843
811844
clean-openssl:
812845
@pushd "$(SSLDIR)" && $(MAKE) clean && popd
813846
!endif
814847
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -116,11 +116,10 @@
116 !if $(FOSSIL_DYNAMIC_BUILD)!=0
117 SSLLIBDIR = $(SSLDIR)
118 !else
119 SSLLIBDIR = $(SSLDIR)
120 !endif
121 SSLLFLAGS = /nologo /opt:ref /debug
122 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
123 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
124 !message Using 'x64' platform for OpenSSL...
125 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
126 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -188,16 +187,27 @@
188 !endif
189
190 !if $(FOSSIL_ENABLE_WINXP)!=0
191 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
192 CFLAGS = $(CFLAGS) $(XPCFLAGS)
 
 
 
 
193 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
194 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
195 !else
196 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
197 !endif
198 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
 
 
 
 
 
 
 
199 !endif
200
201 !if $(FOSSIL_DYNAMIC_BUILD)!=0
202 !if $(DEBUG)!=0
203 CRTFLAGS = /MDd
@@ -795,19 +805,42 @@
795 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
796
797 !if $(FOSSIL_ENABLE_SSL)!=0
798 openssl:
799 @echo Building OpenSSL from "$(SSLDIR)"...
 
 
 
800 !ifdef PERLDIR
801 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
802 !else
803 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
804 !endif
805 !if $(FOSSIL_ENABLE_WINXP)!=0
806 @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
807 !else
808 @pushd "$(SSLDIR)" && $(MAKE) && popd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
809 !endif
810
811 clean-openssl:
812 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
813 !endif
814
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -116,11 +116,10 @@
116 !if $(FOSSIL_DYNAMIC_BUILD)!=0
117 SSLLIBDIR = $(SSLDIR)
118 !else
119 SSLLIBDIR = $(SSLDIR)
120 !endif
 
121 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
122 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
123 !message Using 'x64' platform for OpenSSL...
124 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
125 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -188,16 +187,27 @@
187 !endif
188
189 !if $(FOSSIL_ENABLE_WINXP)!=0
190 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
191 CFLAGS = $(CFLAGS) $(XPCFLAGS)
192 #
193 # NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
194 # explicit initialization is redundant, but is required for post-built edits.
195 #
196 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
197 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
198 !else
199 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
200 !endif
201 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
202 #
203 # NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
204 # is applied in a separate post-build step, see below for more information.
205 #
206 !if $(FOSSIL_ENABLE_SSL)!=0
207 SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
208 !endif
209 !endif
210
211 !if $(FOSSIL_DYNAMIC_BUILD)!=0
212 !if $(DEBUG)!=0
213 CRTFLAGS = /MDd
@@ -795,19 +805,42 @@
805 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
806
807 !if $(FOSSIL_ENABLE_SSL)!=0
808 openssl:
809 @echo Building OpenSSL from "$(SSLDIR)"...
810 !if $(FOSSIL_ENABLE_WINXP)!=0
811 @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
812 !endif
813 !ifdef PERLDIR
814 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
815 !else
816 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
817 !endif
 
 
 
818 @pushd "$(SSLDIR)" && $(MAKE) && popd
819 !if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
820 #
821 # NOTE: Appending custom linker flags to the OpenSSL default linker flags is
822 # somewhat difficult, as summarized in this Fossil Forum post:
823 #
824 # https://fossil-scm.org/forum/forumpost/a9a2d6af28b
825 #
826 # Therefore the custom linker flags required for Windows XP dynamic builds are
827 # applied in a separate post-build step.
828 #
829 # If the build stops here, or if the custom linker flags are outside the scope
830 # of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
831 # the OpenSSL makefile by hand.
832 #
833 # Also note that this step changes the subsystem for the OpenSSL DLLs from
834 # WINDOWS to CONSOLE, but which has no effect on DLLs.
835 #
836 @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
837 @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) \
838 do @( \
839 echo %F & \
840 link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 \
841 )
842 !endif
843
844 clean-openssl:
845 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
846 !endif
847
+39 -6
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -116,11 +116,10 @@
116116
!if $(FOSSIL_DYNAMIC_BUILD)!=0
117117
SSLLIBDIR = $(SSLDIR)
118118
!else
119119
SSLLIBDIR = $(SSLDIR)
120120
!endif
121
-SSLLFLAGS = /nologo /opt:ref /debug
122121
SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
123122
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
124123
!message Using 'x64' platform for OpenSSL...
125124
SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
126125
!if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -188,16 +187,27 @@
188187
!endif
189188
190189
!if $(FOSSIL_ENABLE_WINXP)!=0
191190
XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
192191
CFLAGS = $(CFLAGS) $(XPCFLAGS)
192
+#
193
+# NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
194
+# explicit initialization is redundant, but is required for post-built edits.
195
+#
193196
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
194
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
197
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
195198
!else
196
-XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
199
+XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
197200
!endif
198201
LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
202
+#
203
+# NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
204
+# is applied in a separate post-build step, see below for more information.
205
+#
206
+!if $(FOSSIL_ENABLE_SSL)!=0
207
+SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
208
+!endif
199209
!endif
200210
201211
!if $(FOSSIL_DYNAMIC_BUILD)!=0
202212
!if $(DEBUG)!=0
203213
CRTFLAGS = /MDd
@@ -795,19 +805,42 @@
795805
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
796806
797807
!if $(FOSSIL_ENABLE_SSL)!=0
798808
openssl:
799809
@echo Building OpenSSL from "$(SSLDIR)"...
810
+!if $(FOSSIL_ENABLE_WINXP)!=0
811
+ @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
812
+!endif
800813
!ifdef PERLDIR
801814
@pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
802815
!else
803816
@pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
804817
!endif
805
-!if $(FOSSIL_ENABLE_WINXP)!=0
806
- @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
807
-!else
808818
@pushd "$(SSLDIR)" && $(MAKE) && popd
819
+!if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
820
+#
821
+# NOTE: Appending custom linker flags to the OpenSSL default linker flags is
822
+# somewhat difficult, as summarized in this Fossil Forum post:
823
+#
824
+# https://fossil-scm.org/forum/forumpost/a9a2d6af28b
825
+#
826
+# Therefore the custom linker flags required for Windows XP dynamic builds are
827
+# applied in a separate post-build step.
828
+#
829
+# If the build stops here, or if the custom linker flags are outside the scope
830
+# of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
831
+# the OpenSSL makefile by hand.
832
+#
833
+# Also note that this step changes the subsystem for the OpenSSL DLLs from
834
+# WINDOWS to CONSOLE, but which has no effect on DLLs.
835
+#
836
+ @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
837
+ @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) \
838
+ do @( \
839
+ echo %F & \
840
+ link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 \
841
+ )
809842
!endif
810843
811844
clean-openssl:
812845
@pushd "$(SSLDIR)" && $(MAKE) clean && popd
813846
!endif
814847
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -116,11 +116,10 @@
116 !if $(FOSSIL_DYNAMIC_BUILD)!=0
117 SSLLIBDIR = $(SSLDIR)
118 !else
119 SSLLIBDIR = $(SSLDIR)
120 !endif
121 SSLLFLAGS = /nologo /opt:ref /debug
122 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
123 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
124 !message Using 'x64' platform for OpenSSL...
125 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
126 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -188,16 +187,27 @@
188 !endif
189
190 !if $(FOSSIL_ENABLE_WINXP)!=0
191 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
192 CFLAGS = $(CFLAGS) $(XPCFLAGS)
 
 
 
 
193 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
194 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
195 !else
196 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
197 !endif
198 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
 
 
 
 
 
 
 
199 !endif
200
201 !if $(FOSSIL_DYNAMIC_BUILD)!=0
202 !if $(DEBUG)!=0
203 CRTFLAGS = /MDd
@@ -795,19 +805,42 @@
795 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
796
797 !if $(FOSSIL_ENABLE_SSL)!=0
798 openssl:
799 @echo Building OpenSSL from "$(SSLDIR)"...
 
 
 
800 !ifdef PERLDIR
801 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
802 !else
803 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
804 !endif
805 !if $(FOSSIL_ENABLE_WINXP)!=0
806 @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd
807 !else
808 @pushd "$(SSLDIR)" && $(MAKE) && popd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
809 !endif
810
811 clean-openssl:
812 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
813 !endif
814
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -116,11 +116,10 @@
116 !if $(FOSSIL_DYNAMIC_BUILD)!=0
117 SSLLIBDIR = $(SSLDIR)
118 !else
119 SSLLIBDIR = $(SSLDIR)
120 !endif
 
121 SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
122 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
123 !message Using 'x64' platform for OpenSSL...
124 SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
125 !if $(FOSSIL_DYNAMIC_BUILD)!=0
@@ -188,16 +187,27 @@
187 !endif
188
189 !if $(FOSSIL_ENABLE_WINXP)!=0
190 XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
191 CFLAGS = $(CFLAGS) $(XPCFLAGS)
192 #
193 # NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
194 # explicit initialization is redundant, but is required for post-built edits.
195 #
196 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
197 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
198 !else
199 XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
200 !endif
201 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
202 #
203 # NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
204 # is applied in a separate post-build step, see below for more information.
205 #
206 !if $(FOSSIL_ENABLE_SSL)!=0
207 SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
208 !endif
209 !endif
210
211 !if $(FOSSIL_DYNAMIC_BUILD)!=0
212 !if $(DEBUG)!=0
213 CRTFLAGS = /MDd
@@ -795,19 +805,42 @@
805 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
806
807 !if $(FOSSIL_ENABLE_SSL)!=0
808 openssl:
809 @echo Building OpenSSL from "$(SSLDIR)"...
810 !if $(FOSSIL_ENABLE_WINXP)!=0
811 @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
812 !endif
813 !ifdef PERLDIR
814 @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
815 !else
816 @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
817 !endif
 
 
 
818 @pushd "$(SSLDIR)" && $(MAKE) && popd
819 !if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
820 #
821 # NOTE: Appending custom linker flags to the OpenSSL default linker flags is
822 # somewhat difficult, as summarized in this Fossil Forum post:
823 #
824 # https://fossil-scm.org/forum/forumpost/a9a2d6af28b
825 #
826 # Therefore the custom linker flags required for Windows XP dynamic builds are
827 # applied in a separate post-build step.
828 #
829 # If the build stops here, or if the custom linker flags are outside the scope
830 # of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
831 # the OpenSSL makefile by hand.
832 #
833 # Also note that this step changes the subsystem for the OpenSSL DLLs from
834 # WINDOWS to CONSOLE, but which has no effect on DLLs.
835 #
836 @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
837 @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) \
838 do @( \
839 echo %F & \
840 link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 \
841 )
842 !endif
843
844 clean-openssl:
845 @pushd "$(SSLDIR)" && $(MAKE) clean && popd
846 !endif
847

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button