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
This commit is contained in:
Sergey Sharybin
2010-05-23 21:20:13 +00:00
parent a97904cbcc
commit 735559f0da
4 changed files with 5 additions and 7 deletions

View File

@@ -182,7 +182,7 @@ if os.path.exists(userconfig):
else: else:
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC 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) opts.Update(env)
if not env['BF_FANCY']: if not env['BF_FANCY']:

View File

@@ -174,9 +174,6 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib ${BF_ICONV_LIBPATH}'
WITH_BF_RAYOPTIMIZATION = False WITH_BF_RAYOPTIMIZATION = False
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse'] BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
CC = 'i586-mingw32msvc-gcc'
CXX = 'i586-mingw32msvc-g++'
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ] CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS'] CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS']

View File

@@ -160,7 +160,7 @@ def SetupSpawn( env ):
env['SPAWN'] = buf.ourspawn env['SPAWN'] = buf.ourspawn
def read_opts(cfg, args): def read_opts(env, cfg, args):
localopts = Variables.Variables(cfg, args) localopts = Variables.Variables(cfg, args)
localopts.AddVariables( localopts.AddVariables(
('LCGDIR', 'location of cvs lib dir'), ('LCGDIR', 'location of cvs lib dir'),
@@ -400,8 +400,8 @@ def read_opts(cfg, args):
('BF_BUILDDIR', 'Build dir', ''), ('BF_BUILDDIR', 'Build dir', ''),
('BF_INSTALLDIR', 'Installation dir', ''), ('BF_INSTALLDIR', 'Installation dir', ''),
('CC', 'C compiler to use', ''), ('CC', 'C compiler to use', env['CC']),
('CXX', 'C++ compiler to use', ''), ('CXX', 'C++ compiler to use', env['CXX']),
(BoolVariable('BF_BUILDINFO', 'Buildtime in splash if true', True)), (BoolVariable('BF_BUILDINFO', 'Buildtime in splash if true', True)),

View File

@@ -50,6 +50,7 @@ prefixes = SCons.Util.Split("""
i486-mingw32msvc- i486-mingw32msvc-
i586-mingw32msvc- i586-mingw32msvc-
i686-mingw32msvc- i686-mingw32msvc-
i686-pc-mingw32-
""") """)
def find(env): def find(env):