--- rpython/translator/platform/darwin.py.orig 2017-03-20 06:55:48.000000000 +1100 +++ rpython/translator/platform/darwin.py 2017-03-27 23:20:47.000000000 +1100 @@ -9,7 +9,7 @@ # since 10.5, so we use that as minimum requirement. Bumped to 10.7 # to allow the use of thread-local in __thread in C. # -DARWIN_VERSION_MIN = '-mmacosx-version-min=10.7' +DARWIN_VERSION_MIN = '' class Darwin(posix.BasePosix): name = "darwin" @@ -39,7 +39,7 @@ # we get the basename of the executable we're trying to build. return (list(self.shared_only) + ['-dynamiclib', '-install_name', '@rpath/' + target_basename, - '-undefined', 'dynamic_lookup', '-flat_namespace'] + '-undefined', 'dynamic_lookup'] + args) def _include_dirs_for_libffi(self): @@ -111,11 +111,15 @@ class Darwin_PowerPC(Darwin):#xxx fixme, mwp name = "darwin_powerpc" + link_flags = ('-arch', 'ppc') + cflags = ('-arch', 'ppc', '-O3') class Darwin_i386(Darwin): name = "darwin_i386" - DEFAULT_CC = 'clang -arch i386' + link_flags = ('-arch', 'i386') + cflags = ('-arch', 'i386', '-O3', '-fomit-frame-pointer') class Darwin_x86_64(Darwin): name = "darwin_x86_64" - DEFAULT_CC = 'clang -arch x86_64' + link_flags = ('-arch', 'x86_64') + cflags = ('-arch', 'x86_64', '-O3', '-fomit-frame-pointer')