diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-05-24 01:20:13 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-05-24 01:20:13 +0400 |
commit | 735559f0da66a88d366eaef1d5c91c8285a58815 (patch) | |
tree | 7c44d17a8827e9b77d8ef06df0ca550182537bab | |
parent | a97904cbccffa8f138337c243e59ee8f9ffa8cba (diff) |
Fixes for cross-compilation:
- Set env['CC'] and env['CXX'] as default values for
CC and CXX variables. This fixes problem with overwriting
auto-guessed compilators when reading config files
- Added new prefix for mingw tools
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | config/linuxcross-config.py | 3 | ||||
-rw-r--r-- | tools/btools.py | 6 | ||||
-rw-r--r-- | tools/crossmingw.py | 1 |
4 files changed, 5 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct index 30d8788f040..8593b7eb52f 100644 --- a/SConstruct +++ b/SConstruct @@ -182,7 +182,7 @@ if os.path.exists(userconfig): else: print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC -opts = btools.read_opts(optfiles, B.arguments) +opts = btools.read_opts(env, optfiles, B.arguments) opts.Update(env) if not env['BF_FANCY']: diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py index fe5e954f3bc..1ae042d5b7b 100644 --- a/config/linuxcross-config.py +++ b/config/linuxcross-config.py @@ -174,9 +174,6 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib ${BF_ICONV_LIBPATH}' WITH_BF_RAYOPTIMIZATION = False BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse'] -CC = 'i586-mingw32msvc-gcc' -CXX = 'i586-mingw32msvc-g++' - CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ] CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS'] diff --git a/tools/btools.py b/tools/btools.py index 271fccff50c..e76ada3a985 100644 --- a/tools/btools.py +++ b/tools/btools.py @@ -160,7 +160,7 @@ def SetupSpawn( env ): env['SPAWN'] = buf.ourspawn -def read_opts(cfg, args): +def read_opts(env, cfg, args): localopts = Variables.Variables(cfg, args) localopts.AddVariables( ('LCGDIR', 'location of cvs lib dir'), @@ -400,8 +400,8 @@ def read_opts(cfg, args): ('BF_BUILDDIR', 'Build dir', ''), ('BF_INSTALLDIR', 'Installation dir', ''), - ('CC', 'C compiler to use', ''), - ('CXX', 'C++ compiler to use', ''), + ('CC', 'C compiler to use', env['CC']), + ('CXX', 'C++ compiler to use', env['CXX']), (BoolVariable('BF_BUILDINFO', 'Buildtime in splash if true', True)), diff --git a/tools/crossmingw.py b/tools/crossmingw.py index ba6d4878593..f97fdf3c15e 100644 --- a/tools/crossmingw.py +++ b/tools/crossmingw.py @@ -50,6 +50,7 @@ prefixes = SCons.Util.Split(""" i486-mingw32msvc- i586-mingw32msvc- i686-mingw32msvc- + i686-pc-mingw32- """) def find(env): |