aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-02 15:22:42 +0000
committerlloyd <[email protected]>2011-12-02 15:22:42 +0000
commitd580782ae6b5dfe7e23f59b4bcac4f168d17055f (patch)
tree3a05a944c157f41ee021fce211ffbe3aefc59776
parentec4f86fad8e84ca7391ba79adc854775537cfc19 (diff)
Warn the user if targetting for GCC on Windows without an explicit
--os=windows since likely they actually wanted either --os=cygwin or --os=mingw
-rwxr-xr-xconfigure.py21
-rw-r--r--doc/log.txt5
2 files changed, 17 insertions, 9 deletions
diff --git a/configure.py b/configure.py
index 6fdaf16e7..876108a9f 100755
--- a/configure.py
+++ b/configure.py
@@ -1686,15 +1686,6 @@ def main(argv = None):
(modules, archinfo, ccinfo, osinfo) = load_info_files(options)
- if options.os is None:
- options.os = platform.system().lower()
-
- if re.match('^cygwin_.*', options.os):
- logging.debug("Converting '%s' to 'cygwin'", options.os)
- options.os = 'cygwin'
-
- logging.info('Guessing target OS is %s (use --os to set)' % (options.os))
-
if options.compiler is None:
if options.os == 'windows':
if have_program('g++') and not have_program('cl'):
@@ -1706,6 +1697,18 @@ def main(argv = None):
logging.info('Guessing to use compiler %s (use --cc to set)' % (
options.compiler))
+ if options.os is None:
+ options.os = platform.system().lower()
+
+ if re.match('^cygwin_.*', options.os):
+ logging.debug("Converting '%s' to 'cygwin'", options.os)
+ options.os = 'cygwin'
+
+ if options.os == 'windows' and options.compiler == 'gcc':
+ logging.warning('Detected GCC on Windows; use --os=cygwin or --os=mingw?')
+
+ logging.info('Guessing target OS is %s (use --os to set)' % (options.os))
+
if options.compiler not in ccinfo:
raise Exception('Unknown compiler "%s"; available options: %s' % (
options.compiler, ' '.join(sorted(ccinfo.keys()))))
diff --git a/doc/log.txt b/doc/log.txt
index acce16410..9edd60018 100644
--- a/doc/log.txt
+++ b/doc/log.txt
@@ -23,6 +23,11 @@ Version 1.10.2, Not Yet Released
* Add AltiVec detection for OpenBSD, contributed by Brad Smith (PR 162)
+* If targetting GCC on a Windows system, configure.py will warn that
+ likely you wanted to configure for either MinGW or Cygwin, not the
+ generic Windows target which is oriented to Win32 plus the Visual
+ C++ runtime.
+
* Fixed a compilation problem of the dynamic loader hooks under MinGW GCC
* Don't set a soname on OpenBSD, as it doesn't support it (PR 158)