Skip to content

Commit

Permalink
scons: Added an option to support using multilib gcc in 32-bit mode
Browse files Browse the repository at this point in the history
multilib_arch=32 will pass -m32 to both compiler and linker causing multilib gcc to produce 32bit binaries.
  • Loading branch information
loonycyborg committed Dec 2, 2015
1 parent 3fd592c commit e9eb8d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SConstruct
Expand Up @@ -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),
Expand Down Expand Up @@ -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"])

Expand Down

0 comments on commit e9eb8d3

Please sign in to comment.