This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
OS X versioning dance.
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 16 Oct 2015 00:33:59 +0000 (20:33 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 16 Oct 2015 20:46:36 +0000 (16:46 -0400)
commit53d1d41c81e1de9cc6416dcae828c13d4c5a470a
tree50fb2145ffb4fe45400f0b940242c86159631386
parentb44694539e922b1078113e05f80651c9eedd5d37
OS X versioning dance.

Note the difference between the OS X version (10.X) and the kernel version,
it's the latter that Configure knows as $osvers.  Adding a cross-reference
table for these versions rom the NetBSD project.

For OS X 10.6 or above, do not any more use the MACOSX_DEPLOYMENT_TARGET,
the toolchains should work fine without.  Until now the deployment target
was hardwired to 10.3.  This logic comes from
https://rt.perl.org/Public/Bug/Display.html?id=117433

For OS X releases from 10.3 until 10.5, no change, still using
the MACOSX_DEPLOYMENT_TARGET=10.3 for linking.

For OS X releases before 10.3, no change, still not using
the MACOSX_DEPLOYMENT_TARGET=10.3.

New: always add -mmacosx-version-min to ccflags and ldflags from
the env var $MACOSX_DEPLOYMENT_TARGET, if set.  If the var is not set,
set the min from the OS X version, from sw_vers(1).  Setting the var
should become handy for people building and packaging Perl for earlier
OS X versions.

We assume that the toolchain/SDK installed to system will be able to build
for the requested minimum versions and deployment targets, or if it is not,
it should properly warn or die.

Some related tickets, past and present:

https://rt.perl.org/Public/Bug/Display.html?id=126360
https://rt.perl.org/Public/Bug/Display.html?id=123985
https://rt.perl.org/Public/Bug/Display.html?id=123831
https://rt.perl.org/Public/Bug/Display.html?id=117433
hints/darwin.sh