summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hadrian/src/Settings/Packages.hs10
-rw-r--r--libraries/base/base.cabal12
-rw-r--r--rts/ghc.mk4
-rw-r--r--rts/rts.cabal.in8
4 files changed, 21 insertions, 13 deletions
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs
index 8c9d7875d4..42e95f6664 100644
--- a/hadrian/src/Settings/Packages.hs
+++ b/hadrian/src/Settings/Packages.hs
@@ -368,7 +368,6 @@ rtsPackageArgs = package rts ? do
, input "**/RetainerProfile.c" ? flag CcLlvmBackend ?
arg "-Wno-incompatible-pointer-types"
- , windowsHost ? arg ("-DWINVER=" ++ windowsVersion)
-- libffi's ffi.h triggers various warnings
, inputs [ "**/Interpreter.c", "**/Storage.c", "**/Adjustor.c" ] ?
@@ -455,12 +454,3 @@ rtsWarnings = mconcat
, arg "-Wredundant-decls"
, arg "-Wundef"
, arg "-fno-strict-aliasing" ]
-
--- These numbers can be found at:
--- https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
--- If we're compiling on windows, enforce that we only support Vista SP1+
--- Adding this here means it doesn't have to be done in individual .c files
--- and also centralizes the versioning.
--- | Minimum supported Windows version.
-windowsVersion :: String
-windowsVersion = "0x06010000"
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index 33eccf214f..841b5d251b 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -363,7 +363,17 @@ Library
-- mingwex and mingw32. the __math_err symbol is defined in
-- mingw32 which is required by mingwex.
-- shlwapi: provides PathFileExistsW
- extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex, shlwapi
+ -- ws2_32: provides access to socket types and functions
+ extra-libraries: wsock32, user32, shell32, msvcrt, mingw32,
+ mingwex, ws2_32, shlwapi
+ -- Minimum supported Windows version.
+ -- These numbers can be found at:
+ -- https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
+ -- If we're compiling on windows, enforce that we only support Windows 7+
+ -- Adding this here means it doesn't have to be done in individual .c files
+ -- and also centralizes the versioning.
+ cpp-options: -D_WIN32_WINNT=0x06010000
+ cc-options: -D_WIN32_WINNT=0x06010000
exposed-modules:
GHC.IO.Encoding.CodePage.API
GHC.IO.Encoding.CodePage.Table
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 7e7747b485..32c49d9099 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -22,7 +22,7 @@ rts_VERSION = 1.0
# Minimum supported Windows version.
# These numbers can be found at:
# https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
-# If we're compiling on windows, enforce that we only support Vista SP1+
+# If we're compiling on windows, enforce that we only support Windows 7+
# Adding this here means it doesn't have to be done in individual .c files
# and also centralizes the versioning.
rts_WINVER = 0x06010000
@@ -205,7 +205,7 @@ rts_dist_$1_CC_OPTS += -DRtsWay=\"rts_$1\"
# Adding this here means it doesn't have to be done in individual .c files
# and also centralizes the versioning.
ifeq "$$(TargetOS_CPP)" "mingw32"
-rts_dist_$1_CC_OPTS += -DWINVER=$(rts_WINVER)
+rts_dist_$1_CC_OPTS += -D_WIN32_WINNT=$(rts_WINVER)
endif
ifneq "$$(UseSystemLibFFI)" "YES"
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index 7895ae26f5..ebbd9a9e71 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -97,6 +97,14 @@ library
dbghelp
-- for process information
psapi
+ -- Minimum supported Windows version.
+ -- These numbers can be found at:
+ -- https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
+ -- If we're compiling on windows, enforce that we only support Windows 7+
+ -- Adding this here means it doesn't have to be done in individual .c files
+ -- and also centralizes the versioning.
+ cpp-options: -D_WIN32_WINNT=0x06010000
+ cc-options: -D_WIN32_WINNT=0x06010000
if flag(need-pthread)
-- for pthread_getthreadid_np, pthread_create, ...
extra-libraries: pthread