diff options
-rw-r--r-- | mk/platform/Darwin.mk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk index dbdab98d3cd..ccd149d3b0f 100644 --- a/mk/platform/Darwin.mk +++ b/mk/platform/Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.mk,v 1.99 2020/10/09 16:00:16 jperkin Exp $ +# $NetBSD: Darwin.mk,v 1.100 2020/10/09 17:43:48 jperkin Exp $ # # Variable definitions for the Darwin operating system. @@ -85,7 +85,6 @@ _USER_DEPENDS= user-darwin>=20130712:../../sysutils/user_darwin _OPSYS_EMULDIR.darwin= # empty _OPSYS_SYSTEM_RPATH?= /usr/lib -_OPSYS_LIB_DIRS?= /usr/lib .if !defined(OSX_VERSION) OSX_VERSION!= sw_vers -productVersion @@ -124,10 +123,16 @@ PKG_FAIL_REASON+= "No suitable Xcode SDK or Command Line Tools installed." # Newer macOS releases remove library files from the file system. The only way # to test them is via dlopen(), which is obviously impractical for many things. # -# This define turns off anything that can't reasonably supported this. +# The DARWIN_NO_SYSTEM_LIBS define turns off anything that can't reasonably +# support this. We also need to set _OPSYS_LIB_DIRS for find-libs.mk to look +# in the SDK directory. It may be that this can be set for all versions, but +# for now keep the legacy behaviour and limit it to Big Sur onwards only. # .if ${OS_VERSION:R} >= 20 DARWIN_NO_SYSTEM_LIBS= # defined +_OPSYS_LIB_DIRS?= ${OSX_SDK_PATH}/usr/lib +.else +_OPSYS_LIB_DIRS?= /usr/lib .endif .if ${OS_VERSION:R} >= 6 |