Subject: bug#44605: Support MACOSX_DEPLOYMENT_TARGET=11.0

From: Ryan Schmidt <[email-masked]>
Date: Fri, 8 Jan 2021 11:23:50 -0600

Hearing no objections, I have modified the MacPorts patch per my earlier remarks, and I believe this is now the final patch that should be applied to upstream libtool sources:

https://github.com/macports/macports-ports/blob/fc9e323525ecd0d4fbf18eabada4c53ba415b450/devel/libtool/files/dynamic_lookup-11.patch

In case anyone is wondering about the logic being used here, the goal of this code has always been to build with "-flat_namespace -undefined suppress" when targeting Mac OS X 10.2 and earlier and to build with "-undefined dynamic_lookup" when targeting Mac OS X 10.3 and later. If the MACOSX_DEPLOYMENT_TARGET environment variable is specified, then the decision is based on that. If not, then the decision is based on $host and it follows what the default behavior would be on that host if no deployment target were specified. On PowerPC Mac OS X 10.1-10.4 (Darwin 5 through 8), the default deployment target is 10.1. On PowerPC Mac OS X 10.5 (Darwin 9) and on all OS versions on non-PowerPC architectures, the default deployment target is the first two components of the OS version (i.e. 10.4 on 10.4.x, 10.5 on 10.5.x, etc.).