From 215035190e38a1a5a15f09bfa2059382fd913539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Mon, 28 Oct 2013 20:00:56 +0100 Subject: [PATCH] Add --32 to scons , to force building 32 bit code --- SConstruct | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SConstruct b/SConstruct index c2e62ac..e33447f 100644 --- a/SConstruct +++ b/SConstruct @@ -56,6 +56,12 @@ AddOption('--stack-protection', help = 'Build with stack protection support' ) +AddOption('--32', + dest='force32bit', + action='store_true', + default=False, + help='Force building for 32 bit architecture' +) build_type = GetOption('build_type') assertions = GetOption('assertions') @@ -85,6 +91,10 @@ env.Append(LINKFLAGS = ['-O2', '-pthread']) env.Append(CPPDEFINES = ['_FILE_OFFSET_BITS=64']) env.Append(CPPPATH = ['#include']) +if GetOption('force32bit'): + env.Append(CFLAGS = ['-m32']) + env.Append(LINKFLAGS = ['-m32']) + if build_type == 'release': env.Append(CFLAGS = ['-O2'])