Kaydet (Commit) 38d0bde6 authored tarafından rbuj's avatar rbuj Kaydeden (comit) Caolán McNamara

ExternalProject_python3.mk: MACOSX

To build a universal binary in Mac OS X 10.6+ with an Intel processor, it is better to set --with-universal-archs=intel, remember that Rosetta is not installed by default in Mac OS X v10.6 and it is neither included nor supported in Mac OS X v10.7 or later.

If we don't use --with-universal-archs then the configure.ac sets the architectures:

...
UNIVERSAL_ARCHS="32-bit"
if test "`uname -s`" = "Darwin"
then
        if test -n "${UNIVERSALSDK}"
        then
                if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
                then
                        UNIVERSAL_ARCHS="intel"
                fi
        fi
fi
...

In Snow Leopard (Mac OS 10.6):

/usr/bin/file /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib: Mach-O universal binary with 4 architectures
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture ppc7400):	Mach-O dynamically linked shared library stub ppc
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library stub ppc64
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture i386):	Mach-O dynamically linked shared library stub i386
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library stub x86_64

/usr/bin/file /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib: Mach-O universal binary with 3 architectures
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library stub x86_64
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib (for architecture i386):	Mach-O dynamically linked shared library stub i386
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libSystem.dylib (for architecture ppc7400):	Mach-O dynamically linked shared library stub ppc

If x86_64 (for OS X 10.8+) or PPC (for OS X 10.5) is only desired then a universal binary is not useful and we don't have to use --enable-universalsdk=${UNIVERSALSDK}.

Change-Id: Ib0578cfdb912fed5a803df3d2e04d2b037cfe13f
Reviewed-on: https://gerrit.libreoffice.org/10249Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst cdfd24fe
......@@ -70,7 +70,9 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
OPT="$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS)")) \
$(if $(filter WNT-GCC,$(OS)-$(COM)),--with-threads ac_cv_printf_zd_format=no) \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) --with-universal-archs=32-bit) \
$(if $(filter INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
$(if $(filter 1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),--with-universal-archs=32-bit,--with-universal-archs=intel) \
) \
--enable-framework=/@__________________________________________________OOO --with-framework-name=LibreOfficePython, \
--enable-shared \
) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment