issue-sl-configure-32 Issue8089 - ensure 32-bit/64-bit framework infrastructure is built for new universal build opttions "3-way" and "intel" on 2.6 and 3.1. Note, autoconf needs to be run after applying this patch. APPLIES: issue-sl-configure-32-26.txt (this file) 2.6 issue-sl-configure-32-31.txt 3.1 diff -r 784a38de418f Mac/Makefile.in --- Mac/Makefile.in Mon Mar 08 15:26:34 2010 -0800 +++ Mac/Makefile.in Mon Mar 08 16:05:08 2010 -0800 @@ -15,6 +15,8 @@ FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@ PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@ +LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@ +LIPO_64BIT_FLAGS=@LIPO_64BIT_FLAGS@ # These are normally glimpsed from the previous set @@ -150,11 +152,11 @@ -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"' pythonw-32: $(srcdir)/Tools/pythonw.c Makefile - $(CC) $(LDFLAGS) -o $@ -arch i386 -arch ppc $(srcdir)/Tools/pythonw.c \ + $(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \ -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"' pythonw-64: $(srcdir)/Tools/pythonw.c Makefile - $(CC) $(LDFLAGS) -o $@ -arch x86_64 -arch ppc64 $(srcdir)/Tools/pythonw.c \ + $(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \ -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"' install_PythonLauncher: @@ -215,8 +217,8 @@ rm "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" install_Python4way: install_Python - lipo -extract i386 -extract ppc7400 -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" - lipo -extract x86_64 -extract ppc64 -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" + lipo $(LIPO_32BIT_FLAGS) -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" + lipo $(LIPO_64BIT_FLAGS) -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" diff -r 784a38de418f Mac/README --- Mac/README Mon Mar 08 15:26:34 2010 -0800 +++ Mac/README Mon Mar 08 16:05:08 2010 -0800 @@ -32,7 +32,7 @@ See the section _`Building and using a universal binary of Python on Mac OS X` for more information. -* ``--with-univeral-archs=VALUE`` +* ``--with-universal-archs=VALUE`` Specify the kind of universal binary that should be created. This option is only valid when ``--enable-universalsdk`` is specified. diff -r 784a38de418f configure.in --- configure.in Mon Mar 08 15:26:34 2010 -0800 +++ configure.in Mon Mar 08 16:05:08 2010 -0800 @@ -111,6 +111,13 @@ AC_SUBST(ARCH_RUN_32BIT) UNIVERSAL_ARCHS="32-bit" +# the following LIPO_XX flags are only set for OS X universal builds with +# mixed 32-bit/64-bit variants and are passed to the Mac/Makefile for +# extracting the proper architectures for Python-32 and Python-64 +LIPO_32BIT_FLAGS="" +AC_SUBST(LIPO_32BIT_FLAGS) +LIPO_64BIT_FLAGS="" +AC_SUBST(LIPO_64BIT_FLAGS) AC_MSG_CHECKING(for --with-universal-archs) AC_ARG_WITH(universal-archs, AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")), @@ -176,7 +183,7 @@ PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR FRAMEWORKINSTALLFIRST="frameworkinstallstructure" FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall" - if test "$UNIVERSAL_ARCHS" = "all" + if test "$UNIVERSAL_ARCHS" = "all" -o "$UNIVERSAL_ARCHS" = "3-way" -o "$UNIVERSAL_ARCHS" = "intel" then FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way" FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way" @@ -216,7 +223,7 @@ fi enable_framework= - if test "$UNIVERSAL_ARCHS" = "all" + if test "$UNIVERSAL_ARCHS" = "all" -o "$UNIVERSAL_ARCHS" = "3-way" -o "$UNIVERSAL_ARCHS" = "intel" then FRAMEWORKINSTALLLAST=update4wayuniversal FRAMEWORKALTINSTALLLAST=update4wayuniversal @@ -961,14 +968,20 @@ elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" + LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" + LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64" elif test "$UNIVERSAL_ARCHS" = "intel" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" ARCH_RUN_32BIT="/usr/bin/arch -i386" + LIPO_32BIT_FLAGS="-extract i386" + LIPO_64BIT_FLAGS="-extract x86_64" elif test "$UNIVERSAL_ARCHS" = "3-way" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" + LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" + LIPO_64BIT_FLAGS="-extract x86_64" else AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])