summaryrefslogtreecommitdiff
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-25 12:22:22 +0200
committerGitHub <noreply@github.com>2019-04-25 12:22:22 +0200
commit24005bc03d4774afb5a3eb44db25711c3a9cedf1 (patch)
treefa4d2650672a63b0f4a214c1c6aaff7310eb580c /platform/x11/detect.py
parent7dc7cbea0a576b65562988dee1c143dcc945d369 (diff)
parentc2a669a9f03e249fb4fca96a2adf63256eb8dfa2 (diff)
Merge pull request #28396 from akien-mga/scons-capture-the-flags
SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 94a87a7c90..1905b035e6 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -98,9 +98,10 @@ def configure(env):
elif (env["target"] == "release_debug"):
if (env["optimize"] == "speed"): #optimize for speed (default)
- env.Prepend(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
+ env.Prepend(CCFLAGS=['-O2'])
else: #optimize for size
- env.Prepend(CCFLAGS=['-Os', '-DDEBUG_ENABLED'])
+ env.Prepend(CCFLAGS=['-Os'])
+ env.Prepend(CPPFLAGS=['-DDEBUG_ENABLED'])
if (env["debug_symbols"] == "yes"):
env.Prepend(CCFLAGS=['-g1'])
@@ -108,7 +109,8 @@ def configure(env):
env.Prepend(CCFLAGS=['-g2'])
elif (env["target"] == "debug"):
- env.Prepend(CCFLAGS=['-g3', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Prepend(CCFLAGS=['-g3'])
+ env.Prepend(CPPFLAGS=['-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
env.Append(LINKFLAGS=['-rdynamic'])
## Architecture
@@ -315,10 +317,10 @@ def configure(env):
## Cross-compilation
if (is64 and env["bits"] == "32"):
- env.Append(CPPFLAGS=['-m32'])
+ env.Append(CCFLAGS=['-m32'])
env.Append(LINKFLAGS=['-m32', '-L/usr/lib/i386-linux-gnu'])
elif (not is64 and env["bits"] == "64"):
- env.Append(CPPFLAGS=['-m64'])
+ env.Append(CCFLAGS=['-m64'])
env.Append(LINKFLAGS=['-m64', '-L/usr/lib/i686-linux-gnu'])
# Link those statically for portability