path: root/configure
diff options
authorSitsofe Wheeler <>2018-03-25 20:56:07 +0100
committerSitsofe Wheeler <>2018-03-27 20:18:38 +0100
commita6ab5391edbc87bdf1e5c0d218ccf7d8325a8c55 (patch)
treeaefea32d4604160fbcf1b96822050773ef1a9ef3 /configure
parentdac7244bf482557c2e46aac1171c3890b3d9316f (diff)
windows: target Windows 7 and add support for more than 64 CPUs
Introduce support for targeting the build to either Windows XP or Windows 7 (the default). When targeting Windows 7 this allows us to use the process group APIs which are required are required to support more than 64 CPUs. These changes mean if you want a Windows binary that supports versions of Windows below Windows 7/Windows Server 2008 R2 you will need to explicitly use the --target-win-ver=xp configure option at build time. Such builds will lack features (such as the ability to access CPUs beyond those in fio's default process group) that are dependent on recent Windows APIs. Signed-off-by: Sitsofe Wheeler <>
Diffstat (limited to 'configure')
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index f6358630..b3638807 100755
--- a/configure
+++ b/configure
@@ -167,6 +167,8 @@ for opt do
--build-32bit-win) build_32bit_win="yes"
+ --target-win-ver=*) target_win_ver="$optarg"
+ ;;
--build-static) build_static="yes"
--enable-gfio) gfio_check="yes"
@@ -213,6 +215,7 @@ if test "$show_help" = "yes" ; then
echo "--cc= Specify compiler to use"
echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
echo "--build-32bit-win Enable 32-bit build on Windows"
+ echo "--target-win-ver= Minimum version of Windows to target (XP or 7)"
echo "--build-static Build a static fio"
echo "--esx Configure build options for esx"
echo "--enable-gfio Enable building of gtk gfio"
@@ -333,7 +336,21 @@ CYGWIN*)
output_sym "CONFIG_32BIT"
output_sym "CONFIG_64BIT_LLP64"
+ target_win_ver=$(echo "$target_win_ver" | tr '[:lower:]' '[:upper:]')
+ if test -z "$target_win_ver"; then
+ # Default Windows API target
+ target_win_ver="7"
+ fi
+ if test "$target_win_ver" = "XP"; then
+ output_sym "CONFIG_WINDOWS_XP"
+ elif test "$target_win_ver" = "7"; then
+ output_sym "CONFIG_WINDOWS_7"
+ else
+ fatal "Unknown target Windows version"
# We need this to be output_sym'd here because this is Windows specific.
# The regular configure path never sets this config.
@@ -498,6 +515,9 @@ fi
print_config "Operating system" "$targetos"
print_config "CPU" "$cpu"
print_config "Big endian" "$bigendian"
+if test ! -z "$target_win_ver"; then
+ print_config "Target Windows version" "$target_win_ver"
print_config "Compiler" "$cc"
print_config "Cross compile" "$cross_compile"