Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Mac OSX, SDK and runtime compatibility

Currently configure.in hardcode /Developer/SDKs/MacOSX10.4u.sdk as the
SDK to use and set_soenv.in hardcode MACOSX_DEPLOYMENT_TARGET to
"10.4"

MacOS use the following piece of information:

-isysroot=<MACOSX_SDK_PATH>  : This is given to the compiler/linker to
tell it to use a particular SDK.
MAC_OS_X_VERSION_MIN_REQUIRED : this define tell the compiler which
minimum level or API is required at runtime
MAC_OS_X_VERSION_MAX_ALLOWED : this define tell the compiler the
maximum level of API that can be optionally used at run time
MACOSX_DEPLOYMENT_TARGET : this is a essentially a synonym of
MAC_OS_X_VERSION_MIN_REQUIRED, except that the compiler used to detect
that in the environment to  set some internal variable that is used in
the absence of MAC_OS_X_VERSION_MIN_REQUIRED. This is the legacy flags
from a time where the MIN/MAX mechanism was not supported.

for reference and more detailed explanation see:
http://developer.apple.com/library/mac/#technotes/tn2064/_index.html


The Patch 0001-setup-the-infrastructure-in-configure.in-to-be-more.bootstrap.patch
attached add to configure.in the infrastructure to define these value.
there are 3 new options:

--with-macosx-sdk=<10.4|10.5|10.6>
--with-macosx-version-min-required=<10.4|10.5|10.6>
--with-macosx-version-max-allowed=<10.4|10.5|10.6>

if --with-macosx-version-min-required is not specified it default to 10.4
if --with-macosx-version-max-allowed is not specified it default to
--with-macosx-version-min-required
if --with-macosx-sdk is not specified it default to
--with-macosx-version-max-allowed

--with-macosx-version-min-required must be inferior or equal to
--with-macosx-version-max-allowed
--with-macosx-version-max-allowed must be inferior or equal to --with-macosx-sdk

--with-macosx-sdk must of course exist on the build machine

at the end
MAC_OS_X_VERSION_MIN_REQUIRED is set based on
--with-macosx-version-min-required (but as an integer value : 10.4 =>
1040)
MAC_OS_X_VERSION_MAX_ALLOWED is set based on
--with-macosx-version-max-allowed (but as an integer value : 10.4 =>
1040)
MACOSX_DEPLOYMENT_TARGET is set based on
--with-macosx-version-min-required. This is used because some external
library use that value under that form (10.4 instead of 1040) to build
MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.[4u|5|6].sdk


The Patch 0002-Use-MACOSX_SDK_PATH-and-other-configured-variables-i.bootstrap.patch
make use of the above variables in dmake (solenv/inc/) and in gbuild
(solenv/gbuild/platform)


The Patch 0001-Use-MACOSX_SDK_PATH.libs-extern-sys.patch
modify moz and python makefile to use the new environment variables.

At this point only 10.4/10.4./10.4 is known to work (and behave
exactly like before the patch)

I already know that using anything but 10.4 will fail, for instance
CFLAGS contain un-conditionally -Wno-long-double which is not
supported by gcc after 4.0
but at least with these patches we an start working on improving the
code and build system to support more recent SDKs.

Since there was some argument about that whole topic, I did not push
these patches yet....


Norbert

Attachment: 0001-setup-the-infrastructure-in-configure.in-to-be-more.bootstrap.patch
Description: application/mbox

Attachment: 0002-Use-MACOSX_SDK_PATH-and-other-configured-variables-i.bootstrap.patch
Description: application/mbox

Attachment: 0001-Use-MACOSX_SDK_PATH.libs-extern-sys.patch
Description: application/mbox


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.