From ad647859f4e45af749ca2f5a5bc45aaad3b1ca20 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Fri, 26 May 2006 14:07:23 +0000 Subject: [PATCH] Fix distutils so that libffi will cross-compile between darwin/x86 and darwin/ppc --- Lib/distutils/ccompiler.py | 6 ++---- Modules/_ctypes/libffi/fficonfig.py.in | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py index 6dad757a6a7..1349abeb65f 100644 --- a/Lib/distutils/ccompiler.py +++ b/Lib/distutils/ccompiler.py @@ -15,7 +15,6 @@ from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath from distutils.dep_util import newer_pairwise, newer_group -from distutils.sysconfig import python_build from distutils.util import split_quoted, execute from distutils import log @@ -368,7 +367,7 @@ class CCompiler: # Get the list of expected output (object) files objects = self.object_filenames(sources, - strip_dir=python_build, + strip_dir=0, output_dir=outdir) assert len(objects) == len(sources) @@ -475,8 +474,7 @@ class CCompiler: which source files can be skipped. """ # Get the list of expected output (object) files - objects = self.object_filenames(sources, strip_dir=python_build, - output_dir=output_dir) + objects = self.object_filenames(sources, output_dir=output_dir) assert len(objects) == len(sources) if self.force: diff --git a/Modules/_ctypes/libffi/fficonfig.py.in b/Modules/_ctypes/libffi/fficonfig.py.in index 1a7a67a8193..3364049aeb0 100644 --- a/Modules/_ctypes/libffi/fficonfig.py.in +++ b/Modules/_ctypes/libffi/fficonfig.py.in @@ -29,7 +29,7 @@ ffi_platforms = { # Build all darwin related files on all supported darwin architectures, this # makes it easier to build universal binaries. -if 0: +if 1: all_darwin = ('X86_DARWIN', 'POWERPC_DARWIN') all_darwin_files = [] for pn in all_darwin: