meta-darwin: update to Darwin 21.3 and SDK 12.3
PATCH 1/1 meta-darwin: update to Darwin 21.3 and SDK 12.3
From: Dominik Schnitzer <[email protected]>
Signed-off-by Dominik Schnitzer <[email protected]>
Signed-off-by Etienne Cordonnier <[email protected]>
---
README | 38 ++++-----
classes/package.bbclass | 2 +-
classes/siteinfo.bbclass | 4 +-
conf/machine-sdk/x86_64-darwin.conf | 10 +--
.../nativesdk-packagegroup-sdk-host.bbappend | 2 +-
recipes-core/zlib/zlib_1.2.%.bbappend | 2 +-
...1142-Do-not-use-nm-B-for-Darwin-s-nm.patch | 2 +-
.../cctools-port-crosssdk_973.0.1.bb | 9 +--
.../clang/0037-Fixes_for_Darwin_SDKs.patch | 2 +-
recipes-devtools/clang/clang_%.bbappend | 42 +++++-----
.../erofs-utils/erofs-utils_%.bbappend | 2 +-
recipes-devtools/flex/flex_%.bbappend | 2 +-
...e-null-terminated-to-avoid-collision.patch | 81 +++++++++++++++++++
...0-change-macosx-version-min-to-12.3.patch} | 10 +--
recipes-devtools/gcc/gcc-crosssdk_%.bbappend | 22 ++---
recipes-devtools/gcc/gcc-runtime_%.bbappend | 18 ++---
recipes-devtools/gcc/gcc-source_%.bbappend | 3 +-
recipes-devtools/gcc/libgcc_%.bbappend | 8 +-
.../libtapi/libtapi-native_git.bb | 4 +-
recipes-devtools/ninja/ninja_%.bbappend | 2 +-
.../opkg-utils/opkg-utils_%.bbappend | 2 +-
...10.15.bb => nativesdk-osx-runtime_12.3.bb} | 0
recipes-extended/zstd/zstd_%.bbappend | 2 +-
recipes-support/libmpc/libmpc_%.bbappend | 2 +-
recipes-support/lz4/lz4_%.bbappend | 2 +-
recipes-support/mpfr/mpfr_%.bbappend | 2 +-
26 files changed, 172 insertions(+), 103 deletions(-)
create mode 100644 recipes-devtools/gcc/files/0001-libstdcxx-Rename-null-terminated-to-avoid-collision.patch
rename recipes-devtools/gcc/files/{0100-change-macosx-version-min-to-10.15.patch => 0100-change-macosx-version-min-to-12.3.patch} (81%)
rename recipes-devtools/osx-runtime/{nativesdk-osx-runtime_10.15.bb => nativesdk-osx-runtime_12.3.bb} (100%)README +14 -24
@@ -3,39 +3,29 @@ meta-darwin OpenEmbedded meta layer for darwin based SDKs -Note: For now, only macOS SDK version 10.15 is supported. +Note: Only macOS SDK version 12.3 (Darwin 21) is supported. -You also need a OS-X sysroot tarball/zip file generated (copied) from a target macOS +Ensure you have read and understood the Xcode license terms: +https://www.apple.com/legal/sla/docs/xcode.pdf + +You also need a macOS sysroot tarball/zip file generated (copied) from a target macOS system. This is placed in the osx-runtime files directory and is used to compile the SDK against it. It needs to contain the system libraries (/usr/lib) and include files (/usr/include). This tarball is not part of this meta-darwin layer and must be created by the user. To create it, the user is required to have a legitimate Mac computer -with macOS 10.15 or later and with Xcode 5.1.0 or later installed. - -To create the SDK tarball, perform the following steps using your Mac computer: - -1. Install Xcode 5.1.0 or later using App Store. - -2. Install the command-line development tools - (Preferences -> Downloads -> Command-line tools) - -3. Use Terminal to create the file OSX-sdk.zip from the macOS SDK (this sample assumes - macOS 10.15): +with macOS 12.3 or later and with Xcode installed. - $ mkdir ~/Desktop/OSX-sdk - $ cd ~/Desktop/OSX-sdk - $ ditto `xcrun --sdk macosx10.15 --show-sdk-path` . - $ cd .. - $ zip -yr OSX-sdk OSX-sdk +Information on packaging the SDK is available at: +https://github.com/tpoechtrager/osxcross#packaging-the-sdk -4. Copy the created OSX-sdk.zip file to your Yocto development machine, placing it into - meta-darwin layer: +Copy the created OSX-sdk.zip file to your Yocto development machine, placing it into +meta-darwin layer: - <...>/meta-darwin/recipes-devtools/osx-runtime/files + <...>/meta-darwin/recipes-devtools/osx-runtime/files - You can alternatively add a nativesdk-osx-runtime_%.bbappend file to your - layer and override SRC_URI and do_configure() to extract the SDK from - a different location. +You can alternatively add a nativesdk-osx-runtime_%.bbappend file to your +layer and override SRC_URI and do_configure() to extract the SDK from +a different location. This layer depends on:
classes/package.bbclass +1 -1
@@ -2015,7 +2015,7 @@ python package_do_shlibs() { soname = None if cpath.islink(file): continue - if hostos == "darwin" or hostos == "darwin19": + if hostos == "darwin" or hostos == "darwin21": darwin_so(file, needed, sonames, renames, pkgver) elif hostos.startswith("mingw"): mingw_dll(file, needed, sonames, renames, pkgver)
classes/siteinfo.bbclass +2 -2
@@ -64,7 +64,7 @@ def siteinfo_data_for_machine(arch, os, d): } osinfo = { "darwin": "common-darwin", - "darwin19": "common-darwin", + "darwin21": "common-darwin", "linux": "common-linux common-glibc", "linux-gnu": "common-linux common-glibc", "linux-gnu_ilp32": "common-linux common-glibc",
@@ -119,7 +119,7 @@ def siteinfo_data_for_machine(arch, os, d): "riscv64-linux-musl": "riscv64-linux", "x86_64-cygwin": "bit-64", "x86_64-darwin": "bit-64", - "x86_64-darwin19": "bit-64", + "x86_64-darwin21": "bit-64", "x86_64-linux": "bit-64", "x86_64-linux-musl": "x86_64-linux bit-64", "x86_64-linux-muslx32": "bit-32 ix86-common x32-linux",
conf/machine-sdk/x86_64-darwin.conf +5 -5
@@ -1,8 +1,8 @@ SDK_ARCH = "x86_64" -SDK_OS = "darwin19" +SDK_OS = "darwin21" -SOLIBS:darwin19 = ".dylib" -SOLIBSDEV:darwin19 = ".dylibbroken" +SOLIBS:darwin21 = ".dylib" +SOLIBSDEV:darwin21 = ".dylibbroken" PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc = "nativesdk-osx-runtime" PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial = "nativesdk-osx-runtime"
@@ -18,13 +18,13 @@ SDK_DEPENDS:remove = "nativesdk-glibc-locale nativesdk-qemuwrapper-cross" SDKPKGSUFFIX = "nativesdk-darwin" OSX_TOOLCHAIN_OPTIONS = " \ - -mmacosx-version-min=10.15 \ + -mmacosx-version-min=12.3 \ -L${STAGING_DIR_TARGET}${SDKPATHNATIVE}/usr/lib \ -L${STAGING_DIR_TARGET}${SDKPATHNATIVE}/runtime/usr/lib \ -L${STAGING_DIR_TARGET}${SDKPATHNATIVE}/runtime/usr/lib/system \ " -TOOLCHAIN_OPTIONS:append:darwin19 = " \ +TOOLCHAIN_OPTIONS:append:darwin21 = " \ ${OSX_TOOLCHAIN_OPTIONS}" TOOLCHAIN_OPTIONS:append:class-cross-canadian = " \ ${OSX_TOOLCHAIN_OPTIONS}"
recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend +1 -1
@@ -1,4 +1,4 @@ -RDEPENDS:${PN}:darwin19 = "\ +RDEPENDS:${PN}:darwin21 = "\ nativesdk-flex \ nativesdk-ninja \ nativesdk-bison \
recipes-core/zlib/zlib_1.2.%.bbappend +1 -1
@@ -3,6 +3,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "\ file://0001-fix-wrong-libtool-path.patch \ " -do_configure:darwin19 () { +do_configure:darwin21 () { uname=darwin ./configure --prefix=${prefix} --shared --libdir=${libdir} }
recipes-devtools/binutils/binutils/0001-OS-1142-Do-not-use-nm-B-for-Darwin-s-nm.patch +1 -1
@@ -3,7 +3,7 @@ From: Etienne Cordonnier <[email protected]> Date: Thu, 25 Aug 2022 16:08:58 +0200 Subject: [PATCH] [OS-1142] Do not use nm -B for Darwin's nm -The cross-compiled tool "x86_64-pokysdk-darwin19-nm" does not support +The cross-compiled tool "x86_64-pokysdk-darwin21-nm" does not support the option -B, however the configure script wrongly detects that this option is supported. This causes compilation failures down the line, because configure then
recipes-devtools/cctools-port/cctools-port-crosssdk_973.0.1.bb +3 -6
@@ -3,13 +3,10 @@ SECTION = "devel" LICENSE = "ApplePSLicense-2.0" LIC_FILES_CHKSUM = "file://cctools/APPLE_LICENSE;md5=dacaafbaf91483700da837d31213a1e8" -SRCREV = "6540086c5e12e9c1649fed524b527d8c1793ddc0" -SRC_URI = "git://github.com/tpoechtrager/cctools-port.git;branch=973.0.1-ld64-609;protocol=https" +SRCREV = "f28fb5e9c31efd3d0552afcce2d2c03cae25c1ca" +SRC_URI = "git://github.com/tpoechtrager/cctools-port.git;branch=master;protocol=https" -SRC_URI[md5sum] = "1f2507d489c7416f3bfc447bd7d3a07e" -SRC_URI[sha256sum] = "1fa3dd2c4d7192e284481927fceaaa1b2b0e2efff8f219479b87c95dc840c5d3" - -PR = "r1" +PR = "r2" inherit autotools crosssdk
recipes-devtools/clang/clang/0037-Fixes_for_Darwin_SDKs.patch +1 -1
@@ -23,7 +23,7 @@ index f7da3f187814..0656f5cbad69 100644 - "i686-apple-darwin10", - arch == llvm::Triple::x86_64 ? "x86_64" : ""); + "11.3.0", -+ "x86_64#SDK_VENDOR#-darwin19", ++ "x86_64#SDK_VENDOR#-darwin21", + ""); IsBaseFound |= AddGnuCPlusPlusIncludePaths(DriverArgs, CC1Args, UsrIncludeCxx, - "4.0.0", "i686-apple-darwin8",
recipes-devtools/clang/clang_%.bbappend +21 -21
71 lines not on this page · raw message
recipes-devtools/erofs-utils/erofs-utils_%.bbappend +1 -1
@@ -1,3 +1,3 @@ -CPPFLAGS:append:class-nativesdk:darwin19 = " \ +CPPFLAGS:append:class-nativesdk:darwin21 = " \ -I${STAGING_INCDIR} \ "
recipes-devtools/flex/flex_%.bbappend +1 -1
@@ -1,5 +1,5 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -SRC_URI:append:class-nativesdk:darwin19 = "\ +SRC_URI:append:class-nativesdk:darwin21 = "\ file://0001-scanner-include-flexdevh-at-top-block-of-scanl.patch \ "
recipes-devtools/gcc/files/0001-libstdcxx-Rename-null-terminated-to-avoid-collision.patch new file +81 -0
81 lines not on this page · raw message
recipes-devtools/gcc/files/0100-change-macosx-version-min-to-12.3.patch renamed from recipes-devtools/gcc/files/0100-change-macosx-version-min-to-10.15.patch +5 -5
@@ -1,7 +1,7 @@ From 07ee0f0eb8442174b2e5d39862bd99952c2cfb64 Mon Sep 17 00:00:00 2001 From: Etienne Cordonnier <[email protected]> Date: Thu, 11 Aug 2022 15:39:44 +0200 -Subject: [PATCH] change macosx-version-min to 10.15 +Subject: [PATCH] change macosx-version-min to 12.3 Upstream-Status: Inappropriate [OE specific] Signed-off-by: Etienne Cordonnier <[email protected]>
@@ -17,19 +17,19 @@ index 299d26c2c96..c7117023277 100644 # Set this as a minimum (unless overriden by arch t-files) since it's a # reasonable lowest common denominator that works for all our archs. -HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.4 -+HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.15 ++HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=12.3 crt3.o: $(srcdir)/config/darwin-crt3.c - $(crt_compile) -mmacosx-version-min=10.4 -c $< -+ $(crt_compile) -mmacosx-version-min=10.15 -c $< ++ $(crt_compile) -mmacosx-version-min=12.3 -c $< crttms.o: $(srcdir)/config/darwin-crt-tm.c - $(crt_compile) -mmacosx-version-min=10.4 -DSTART -c $< -+ $(crt_compile) -mmacosx-version-min=10.15 -DSTART -c $< ++ $(crt_compile) -mmacosx-version-min=12.3 -DSTART -c $< crttme.o: $(srcdir)/config/darwin-crt-tm.c - $(crt_compile) -mmacosx-version-min=10.4 -DEND -c $< -+ $(crt_compile) -mmacosx-version-min=10.15 -DEND -c $< ++ $(crt_compile) -mmacosx-version-min=12.3 -DEND -c $< # Make emutls weak so that we can deal with -static-libgcc, override the # hidden visibility when this is present in libgcc_eh.
recipes-devtools/gcc/gcc-crosssdk_%.bbappend +11 -11
@@ -1,20 +1,20 @@ -SYSTEMHEADERS:darwin19 = "${SDKPATHNATIVE}/runtime/usr/include/" +SYSTEMHEADERS:darwin21 = "${SDKPATHNATIVE}/runtime/usr/include/" -LINKER_HASH_STYLE:darwin19 = "" +LINKER_HASH_STYLE:darwin21 = "" -EXTRA_OECONF:remove:darwin19 = "--enable-clocale=gnu" -EXTRA_OECONF:remove:darwin19 = "--enable-clocale=generic" +EXTRA_OECONF:remove:darwin21 = "--enable-clocale=gnu" +EXTRA_OECONF:remove:darwin21 = "--enable-clocale=generic" -EXTRA_OECONF:remove:darwin19 = "--enable-initfini-array" -EXTRA_OECONF:append:darwin19 = " --disable-initfini-array" +EXTRA_OECONF:remove:darwin21 = "--enable-initfini-array" +EXTRA_OECONF:append:darwin21 = " --disable-initfini-array" -LTO:darwin19 = "--disable-lto" -EXTRA_OECONF:remove:darwin19 = "--enable-lto" -EXTRA_OECONF:append:darwin19 = " --disable-lto" +LTO:darwin21 = "--disable-lto" +EXTRA_OECONF:remove:darwin21 = "--enable-lto" +EXTRA_OECONF:append:darwin21 = " --disable-lto" -DEPENDS:append:darwin19 = " nativesdk-osx-runtime" +DEPENDS:append:darwin21 = " nativesdk-osx-runtime" -do_configure:prepend:darwin19 () { +do_configure:prepend:darwin21 () { export ARCH_FLAGS_FOR_TARGET=" $ARCH_FLAGS_FOR_TARGET \ -L${SDKPATHNATIVE}/usr/lib \ -L${SDKPATHNATIVE}/runtime/usr/lib \
recipes-devtools/gcc/gcc-runtime_%.bbappend +9 -9
@@ -1,14 +1,14 @@ -EXTRA_OECONF:remove:darwin19 = "--enable-clocale=gnu" -EXTRA_OECONF:remove:darwin19 = "--enable-clocale=generic" +EXTRA_OECONF:remove:darwin21 = "--enable-clocale=gnu" +EXTRA_OECONF:remove:darwin21 = "--enable-clocale=generic" -RUNTIMETARGET:remove:darwin19 = "libmpx" +RUNTIMETARGET:remove:darwin21 = "libmpx" -FILES:libssp:append:darwin19 = " ${libdir}/libssp*.dylib" -FILES:libstdc++:append:darwin19 = " ${libdir}/libstdc++*.dylib" -FILES:libitm:append:darwin19 = " ${libdir}/libitm*.dylib" -FILES:libatomic:append:darwin19 = " ${libdir}/libatomic*.dylib" -FILES:libgomp:append:darwin19 = " ${libdir}/libgomp*.dylib" -FILES:${PN}-dbg:append:darwin19 = " ${libdir}/libstdc++.a-gdb.py" +FILES:libssp:append:darwin21 = " ${libdir}/libssp*.dylib" +FILES:libstdc++:append:darwin21 = " ${libdir}/libstdc++*.dylib" +FILES:libitm:append:darwin21 = " ${libdir}/libitm*.dylib" +FILES:libatomic:append:darwin21 = " ${libdir}/libatomic*.dylib" +FILES:libgomp:append:darwin21 = " ${libdir}/libgomp*.dylib" +FILES:${PN}-dbg:append:darwin21 = " ${libdir}/libstdc++.a-gdb.py" # Replace do_configure and do_check from poky. We can't link libstdc++.dylib to # a dummy libstdc++.so, because this adds a dependency to the generated libstdc++.dylib.
recipes-devtools/gcc/gcc-source_%.bbappend +2 -1
@@ -2,6 +2,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI:append = "\ file://0099-nativesdk-gcc-darwin.patch \ - file://0100-change-macosx-version-min-to-10.15.patch \ + file://0100-change-macosx-version-min-to-12.3.patch \ file://0101-optional-libstdc.patch \ + file://0001-libstdcxx-Rename-null-terminated-to-avoid-collision.patch \ "
recipes-devtools/gcc/libgcc_%.bbappend +4 -4
@@ -1,12 +1,12 @@ -SYSTEMHEADERS:darwin19 = "${SDKPATHNATIVE}/runtime/usr/include/" +SYSTEMHEADERS:darwin21 = "${SDKPATHNATIVE}/runtime/usr/include/" -do_compile:darwin19() { +do_compile:darwin21() { oe_runmake all-target-libgcc MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN} } # See file gcc/config/darwin.h in the gcc repository to understand which library is being linked against, # depending on the minimum version of os-x targetted (parameter "mmacosx-version-min"). -do_install:darwin19 () { +do_install:darwin21 () { install -d ${D}${libdir} cp ${B}/${TARGET_SYS}/${BPN}/libgcc_s.1.1.dylib ${D}${libdir} cp ${B}/${TARGET_SYS}/${BPN}/libemutls_w.a ${D}${libdir}
@@ -15,4 +15,4 @@ do_install:darwin19 () { ${TARGET_SYS}-install_name_tool -id ${libdir}/libgcc_s.1.1.dylib ${D}/${libdir}/libgcc_s.1.1.dylib } -FILES:${PN}:append:darwin19 = " ${libdir}" +FILES:${PN}:append:darwin21 = " ${libdir}"
recipes-devtools/libtapi/libtapi-native_git.bb +2 -2
@@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE.APPLE-LIBTAPI.txt;md5=ecd05d65 SECTION = "devel" -SRCREV = "664b8414f89612f2dfd35a9b679c345aa5389026" -SRC_URI = "git://github.com/tpoechtrager/apple-libtapi.git;branch=${TAPI_REPOSITORY};protocol=https" +SRCREV = "b7b5bdbfda9e8062d405b48da3b811afad98ae76" +SRC_URI = "git://github.com/tpoechtrager/apple-libtapi.git;branch=master;protocol=https" PACKAGES = "${PN}-dbg ${PN} ${PN}-dev"
recipes-devtools/ninja/ninja_%.bbappend +1 -1
@@ -1,4 +1,4 @@ -do_compile:darwin19() { +do_compile:darwin21() { python3 ./configure.py --platform darwin ninja }
recipes-devtools/opkg-utils/opkg-utils_%.bbappend +1 -1
@@ -1,3 +1,3 @@ -PACKAGECONFIG:darwin19:class-nativesdk = "update-alternatives" +PACKAGECONFIG:darwin21:class-nativesdk = "update-alternatives" RDEPENDS:opkg-utils:class-nativesdk = ""
recipes-devtools/osx-runtime/nativesdk-osx-runtime_12.3.bb renamed from recipes-devtools/osx-runtime/nativesdk-osx-runtime_10.15.bb +0 -0
recipes-extended/zstd/zstd_%.bbappend +1 -1
@@ -1,3 +1,3 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -EXTRA_OEMAKE:append:darwin19 = " UNAME='Darwin'" +EXTRA_OEMAKE:append:darwin21 = " UNAME='Darwin'"
recipes-support/libmpc/libmpc_%.bbappend +1 -1
@@ -1 +1 @@ -EXTRA_OECONF:append:darwin19 = " --with-gmp=${STAGING_EXECPREFIXDIR}" +EXTRA_OECONF:append:darwin21 = " --with-gmp=${STAGING_EXECPREFIXDIR}"
recipes-support/lz4/lz4_%.bbappend +1 -1
@@ -1,3 +1,3 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -EXTRA_OEMAKE:append:darwin19 = " TARGET_OS='Darwin'" +EXTRA_OEMAKE:append:darwin21 = " TARGET_OS='Darwin'"
recipes-support/mpfr/mpfr_%.bbappend +1 -1
@@ -1 +1 @@ -EXTRA_OECONF:append:darwin19 = " --with-gmp=${STAGING_EXECPREFIXDIR}" +EXTRA_OECONF:append:darwin21 = " --with-gmp=${STAGING_EXECPREFIXDIR}"
Signature · 1 line
2.36.1.vfs.0.0