From: Ilya Kulakov Date: Sun, 24 Feb 2013 13:26:48 +0000 (+0700) Subject: Ensure only SSE2 instructions are used. X-Git-Tag: 13.05~64^2~34^2^2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=aedf87e1b505accd07eba05453711290b49f1644;p=cura.git Ensure only SSE2 instructions are used. Cura is supposed to work on at least 32bit CPU on 10.6 Such CPUs support only SSE2. --- diff --git a/README.md b/README.md index b3141691..c65237dd 100644 --- 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 \ diff --git a/scripts/darwin/python.rb b/scripts/darwin/python.rb index 4a12cd35..71e24fae 100644 --- a/scripts/darwin/python.rb +++ b/scripts/darwin/python.rb @@ -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