summaryrefslogtreecommitdiffstats
path: root/scons
diff options
context:
space:
mode:
Diffstat (limited to 'scons')
-rw-r--r--scons/gallium.py1
-rw-r--r--scons/llvm.py18
2 files changed, 11 insertions, 8 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index bf6172b4d77..47b07744be9 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -340,6 +340,7 @@ def generate(env):
'-m32',
#'-march=pentium4',
'-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
+ '-mstackrealign', # ensure stack is aligned -- do not enabled -msse without it!
#'-mfpmath=sse',
]
if env['machine'] == 'x86_64':
diff --git a/scons/llvm.py b/scons/llvm.py
index 702f1e354f6..46a8d829ca4 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -56,15 +56,17 @@ def generate(env):
env.PrependENVPath('PATH', llvm_bin_dir)
if env.Detect('llvm-config'):
- try:
- env['LLVM_VERSION'] = env.backtick('llvm-config --version')
- except AttributeError:
- env['LLVM_VERSION'] = 'X.X'
+ version = env.backtick('llvm-config --version').rstrip()
- env.ParseConfig('llvm-config --cppflags')
- env.ParseConfig('llvm-config --libs jit interpreter nativecodegen bitwriter')
- env.ParseConfig('llvm-config --ldflags')
- env['LINK'] = env['CXX']
+ try:
+ env.ParseConfig('llvm-config --cppflags')
+ env.ParseConfig('llvm-config --libs jit interpreter nativecodegen bitwriter')
+ env.ParseConfig('llvm-config --ldflags')
+ except OSError:
+ print 'llvm-config version %s failed' % version
+ else:
+ env['LINK'] = env['CXX']
+ env['LLVM_VERSION'] = version
def exists(env):
return True