22 # along with this program; if not, write to the Free Software |
22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
25 |
25 |
26 from ..toolchain_gcc import toolchain_gcc |
26 from ..toolchain_gcc import toolchain_gcc |
|
27 import platform |
27 |
28 |
28 |
29 |
29 class OSX_target(toolchain_gcc): |
30 class OSX_target(toolchain_gcc): |
30 dlopen_prefix = "./" |
31 dlopen_prefix = "./" |
31 extension = ".dynlib" |
32 extension = ".dynlib" |
32 |
33 |
33 def getBuilderCFLAGS(self): |
34 def getBuilderCFLAGS(self): |
34 return toolchain_gcc.getBuilderCFLAGS(self) + \ |
35 return toolchain_gcc.getBuilderCFLAGS(self) + \ |
35 ["-fPIC", "-Wno-deprecated-declarations", |
36 ["-fPIC", "-Wno-deprecated-declarations", |
36 "-Wno-implicit-function-declaration", "-Wno-int-conversion", |
37 "-Wno-implicit-function-declaration", "-Wno-int-conversion", |
37 "-Wno-parentheses-equality", "-Wno-varargs"] |
38 "-Wno-parentheses-equality", "-Wno-varargs", "-arch", platform.machine()] |
38 |
39 |
39 def getBuilderLDFLAGS(self): |
40 def getBuilderLDFLAGS(self): |
40 return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared"] |
41 return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared", "-arch", platform.machine()] |