develooper Front page | perl.perl5.porters | Postings from October 2015

Re: [perl #126360] MACOSX_DEPLOYMENT_TARGET

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
October 16, 2015 16:48
Subject:
Re: [perl #126360] MACOSX_DEPLOYMENT_TARGET
Message ID:
CA+vYcVz=+b+2OsGP3GLt6gdFDtTysbzrvJx7tNLjsph4-3OYTg@mail.gmail.com
On Fri, Oct 16, 2015 at 11:18 AM, David E. Wheeler
<david@justatheory.com> wrote:

> In this answer to an SO question I posted:
>
>   http://stackoverflow.com/a/32284231/79202
>
> The suggestion is to dynamically set MACOSX_DEPLOYMENT_TARGET in `hints/darwin.sh`. Is there any reason why it shouldn’t just be set to the version of the OS on which it’s being built?

That's kinda sorta what Jarkko's latest patch does when building on
10.6 or later, except instead of using the environment setting we use
the -mmacosx-version-min command-line switch, adding it to compiler
and linker flags.  The default is to use the OS version we're building
on as the value for that switch, but if MACOSX_DEPLOYMENT_TARGET is
set in the environment, we capture its value and use that instead.

In either case (overridden from the environment or not) the
-mmacosx-version-min settings in the flags will produce a consistent
build target for extensions built against that perl later on other
systems that are on different OS versions and/or do not have the
environment setting.

Current docs define the environment setting as follows:

       MACOSX_DEPLOYMENT_TARGET
           If -mmacosx-version-min is unspecified, the default
deployment target is read from this environment
           variable.  This option only affects darwin targets.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About