chiark / gitweb /
Ensure only SSE2 instructions are used.
authorIlya Kulakov <kulakov.ilya@gmail.com>
Sun, 24 Feb 2013 13:26:48 +0000 (20:26 +0700)
committerIlya Kulakov <kulakov.ilya@gmail.com>
Sat, 9 Mar 2013 08:57:16 +0000 (15:57 +0700)
Cura is supposed to work on at least 32bit CPU on 10.6
Such CPUs support only SSE2.

README.md
scripts/darwin/python.rb

index b314169100bbcc469e97c81a8c0b470ac3fd4fbb..c65237dd67ad15f6135134ca24f49ff866fea90a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -62,6 +62,8 @@ Assuming you have virtualenv at *~/.virtualenvs/Cura/* and [wxPython sources](ht
 1. `cd` into *~/Downloads/wxPython-src-2.9.4.0/* and configure the sources:
 
         ./configure \
+        CFLAGS='-msse2 -mno-sse3 -mno-sse4' \
+        CXXFLAGS='-msse2 -mno-sse3 -mno-sse4' \
         --disable-debug \
         --enable-clipboard \
         --enable-display \
index 4a12cd35b574efa2e0745a6c5aeb707d032993db..71e24fae13eb9664f48e95247610a9c55f7247ee 100644 (file)
@@ -181,7 +181,7 @@ class Python < Formula
 
   def distutils_fix_superenv(args)
     # To allow certain Python bindings to find brewed software:
-    cflags = "CFLAGS=-I#{HOMEBREW_PREFIX}/include -I#{Formula.factory('sqlite').opt_prefix}/include"
+    cflags = "CFLAGS=-msse2 -mno-sse3 -mno-sse4 -I#{HOMEBREW_PREFIX}/include -I#{Formula.factory('sqlite').opt_prefix}/include"
     ldflags = "LDFLAGS=-L#{HOMEBREW_PREFIX}/lib -L#{Formula.factory('sqlite').opt_prefix}/lib"
     unless MacOS::CLT.installed?
       # Help Python's build system (distribute/pip) to build things on Xcode-only systems
@@ -210,6 +210,7 @@ class Python < Formula
     #     building dbm using ndbm
     #     error: /usr/include/zlib.h: No such file or directory
     ENV.append 'CPPFLAGS', "-I#{MacOS.sdk_path}/usr/include" unless MacOS::CLT.installed?
+    ENV.append_to_cflags '-msse2 -mno-sse3 -mno-sse4'
 
     # Don't use optimizations other than "-Os" here, because Python's distutils
     # remembers (hint: `python3-config --cflags`) and reuses them for C