Mesa (master): scons: Fix Mac OS X SCons build on 32-bit CPUs.

Vinson Lee vlee at kemper.freedesktop.org
Mon Jul 19 18:39:28 UTC 2010


Module: Mesa
Branch: master
Commit: 95ca22001a4d72325f963662a635d2b45feaf7b5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=95ca22001a4d72325f963662a635d2b45feaf7b5

Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Jul 19 11:31:44 2010 -0700

scons: Fix Mac OS X SCons build on 32-bit CPUs.

The Mac OS X SCons build failed on 32-bit CPUs starting with commit
2f6d47a7c8d6e69e5154de44115aab9ba35a41d2 during linking of graw-null.
The build succeeds though on a 64-bit CPU. See FDO bug 29117.

This was the compiler error.
scons: building associated VariantDir targets: build/darwin-x86-debug
  Linking build/darwin-x86-debug/gallium/targets/graw-null/libgraw.dylib ...
Undefined symbols:
  "_lp_swizzled_cbuf", referenced from:
      _lp_swizzled_cbuf$non_lazy_ptr in libllvmpipe.a(lp_rast.os)
      _lp_swizzled_cbuf$non_lazy_ptr in libllvmpipe.a(lp_rast_tri.os)
     (maybe you meant: _lp_swizzled_cbuf$non_lazy_ptr)
  "_lp_dummy_tile", referenced from:
      _lp_dummy_tile$non_lazy_ptr in libllvmpipe.a(lp_rast.os)
      _lp_dummy_tile$non_lazy_ptr in libllvmpipe.a(lp_rast_tri.os)
      _lp_dummy_tile$non_lazy_ptr in libllvmpipe.a(lp_setup.os)
     (maybe you meant: _lp_dummy_tile$non_lazy_ptr)

The patch adds -fno-common to all Mac OS X builds to work around this issue.

---

 scons/gallium.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 388f446..f03716b 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -282,7 +282,7 @@ def generate(env):
                 ccflags += [
                     '-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
                 ]
-            if platform == 'windows':
+            if platform in ['windows', 'darwin']:
                 # Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216
                 ccflags += ['-fno-common']
             if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):




More information about the mesa-commit mailing list