scons: Added an option to support using multilib gcc in 32-bit mode
multilib_arch=32 will pass -m32 to both compiler and linker causing multilib gcc to produce 32bit binaries.
This commit is contained in:
parent
4456dcbfaf
commit
f709b8ee8f
1 changed files with 5 additions and 0 deletions
|
@ -97,6 +97,7 @@ opts.AddVariables(
|
|||
PathVariable('gtkdir', 'Directory where GTK SDK is installed.', "", OptionalPath),
|
||||
PathVariable('luadir', 'Directory where Lua binary package is unpacked.', "", OptionalPath),
|
||||
('host', 'Cross-compile host.', ''),
|
||||
EnumVariable('multilib_arch', 'Address model for multilib compiler: 32-bit or 64-bit', "", ["", "32", "64"]),
|
||||
('jobs', 'Set the number of parallel compilations', "1", lambda key, value, env: int(value), int),
|
||||
BoolVariable('distcc', 'Use distcc', False),
|
||||
BoolVariable('ccache', "Use ccache", False),
|
||||
|
@ -304,6 +305,10 @@ configure_args = dict(
|
|||
|
||||
env.MergeFlags(env["extra_flags_config"])
|
||||
|
||||
if env["multilib_arch"]:
|
||||
multilib_flag = "-m" + env["multilib_arch"]
|
||||
env.AppendUnique(CCFLAGS = [multilib_flag], LINKFLAGS = [multilib_flag])
|
||||
|
||||
# Some tests need to load parts of boost
|
||||
env.PrependENVPath('LD_LIBRARY_PATH', env["boostlibdir"])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue