mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
MacOS X: Enable 4-way universal builds
This patch adds a new configure argument on OSX: --with-universal-archs=[32-bit|64-bit|all] When used with the --enable-universalsdk option this controls which CPU architectures are includes in the framework. The default is 32-bit, meaning i386 and ppc. The most useful alternative is 'all', which includes all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64). This includes limited support for the Carbon bindings in 64-bit mode as well, limited because (a) I haven't done extensive testing and (b) a large portion of the Carbon API's aren't available in 64-bit mode anyway. I've also duplicated a feature of Apple's build of python: setting the environment variable 'ARCHFLAGS' controls the '-arch' flags used for building extensions using distutils.
This commit is contained in:
parent
80af6da748
commit
5640ce2f1e
52 changed files with 1129 additions and 207 deletions
|
@ -106,6 +106,7 @@ PyMac_Error(OSErr err)
|
|||
}
|
||||
|
||||
|
||||
#ifndef __LP64__
|
||||
OSErr
|
||||
PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
|
||||
{
|
||||
|
@ -153,6 +154,7 @@ PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
|
|||
Py_XDECREF(fs);
|
||||
return err;
|
||||
}
|
||||
#endif /* !__LP64__ */
|
||||
|
||||
/* Convert a 4-char string object argument to an OSType value */
|
||||
int
|
||||
|
@ -417,6 +419,7 @@ GLUE_CONVERT(RGBColor, QdRGB_Convert, "Carbon.Qd")
|
|||
GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
|
||||
GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
|
||||
|
||||
#ifndef __LP64__
|
||||
GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
|
||||
GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
|
||||
GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
|
||||
|
@ -429,6 +432,7 @@ GLUE_NEW(UserData, UserDataObj_New, "Carbon.Qt")
|
|||
GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
|
||||
GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
|
||||
GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
|
||||
#endif /* !__LP64__ */
|
||||
|
||||
GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
|
||||
GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue