From: ecordonnier@snap.com
To: yocto-patches@lists.yoctoproject.org
Cc: Dominik Schnitzer <dominik@snap.com>,
Etienne Cordonnier <ecordonnier@snap.com>
Subject: [meta-darwin][PATCH 2/2] arm64-darwin: use require to reduce duplication
Date: Tue, 27 May 2025 15:24:15 +0200 [thread overview]
Message-ID: <20250527132415.2160472-2-ecordonnier@snap.com> (raw)
In-Reply-To: <20250527132415.2160472-1-ecordonnier@snap.com>
From: Dominik Schnitzer <dominik@snap.com>
Signed-off-by: Dominik Schnitzer <dominik@snap.com>
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
conf/machine-sdk/arm64-darwin.conf | 39 +----------------------------
conf/machine-sdk/darwin-common.inc | 37 +++++++++++++++++++++++++++
conf/machine-sdk/x86_64-darwin.conf | 39 +----------------------------
3 files changed, 39 insertions(+), 76 deletions(-)
create mode 100644 conf/machine-sdk/darwin-common.inc
diff --git a/conf/machine-sdk/arm64-darwin.conf b/conf/machine-sdk/arm64-darwin.conf
index 1843f64..d91a78f 100644
--- a/conf/machine-sdk/arm64-darwin.conf
+++ b/conf/machine-sdk/arm64-darwin.conf
@@ -1,40 +1,3 @@
SDK_ARCH = "aarch64"
-SDK_OS = "darwin21"
-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"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils = "cctools-port-crosssdk"
-PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-osx-runtime"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl = "nativesdk-osx-runtime"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv = "nativesdk-osx-runtime"
-
-SDKUSE_NLS = "no"
-SDKIMAGE_LINGUAS = ""
-SDK_DEPENDS:remove = "nativesdk-glibc-locale nativesdk-qemuwrapper-cross"
-
-SDKPKGSUFFIX = "nativesdk-darwin"
-
-OSX_TOOLCHAIN_OPTIONS = " \
- -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:darwin21 = " \
- ${OSX_TOOLCHAIN_OPTIONS}"
-TOOLCHAIN_OPTIONS:append:class-cross-canadian = " \
- ${OSX_TOOLCHAIN_OPTIONS}"
-
-# Remove -rpath-link
-BUILDSDK_LDFLAGS = " \
- -L${STAGING_LIBDIR} \
- -Wl,-rpath,${libdir} \
- -L${STAGING_DIR_HOST}${base_libdir} \
- -Wl,-rpath,${base_libdir} \
-"
-
-MACHINEOVERRIDES .= ":darwinsdk"
+require darwin-common.inc
diff --git a/conf/machine-sdk/darwin-common.inc b/conf/machine-sdk/darwin-common.inc
new file mode 100644
index 0000000..cec76a5
--- /dev/null
+++ b/conf/machine-sdk/darwin-common.inc
@@ -0,0 +1,37 @@
+SDK_OS = "darwin21"
+
+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"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils = "cctools-port-crosssdk"
+PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-osx-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl = "nativesdk-osx-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv = "nativesdk-osx-runtime"
+
+SDKUSE_NLS = "no"
+SDKIMAGE_LINGUAS = ""
+SDK_DEPENDS:remove = "nativesdk-glibc-locale nativesdk-qemuwrapper-cross"
+
+SDKPKGSUFFIX = "nativesdk-darwin"
+
+OSX_TOOLCHAIN_OPTIONS = " \
+ -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:darwin21 = " \
+ ${OSX_TOOLCHAIN_OPTIONS}"
+TOOLCHAIN_OPTIONS:append:class-cross-canadian = " \
+ ${OSX_TOOLCHAIN_OPTIONS}"
+
+# Remove -rpath-link
+BUILDSDK_LDFLAGS = " \
+ -L${STAGING_LIBDIR} \
+ -Wl,-rpath,${libdir} \
+"
+
+MACHINEOVERRIDES .= ":darwinsdk"
diff --git a/conf/machine-sdk/x86_64-darwin.conf b/conf/machine-sdk/x86_64-darwin.conf
index 89f3e0a..199cab7 100644
--- a/conf/machine-sdk/x86_64-darwin.conf
+++ b/conf/machine-sdk/x86_64-darwin.conf
@@ -1,40 +1,3 @@
SDK_ARCH = "x86_64"
-SDK_OS = "darwin21"
-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"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils = "cctools-port-crosssdk"
-PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-osx-runtime"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl = "nativesdk-osx-runtime"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv = "nativesdk-osx-runtime"
-
-SDKUSE_NLS = "no"
-SDKIMAGE_LINGUAS = ""
-SDK_DEPENDS:remove = "nativesdk-glibc-locale nativesdk-qemuwrapper-cross"
-
-SDKPKGSUFFIX = "nativesdk-darwin"
-
-OSX_TOOLCHAIN_OPTIONS = " \
- -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:darwin21 = " \
- ${OSX_TOOLCHAIN_OPTIONS}"
-TOOLCHAIN_OPTIONS:append:class-cross-canadian = " \
- ${OSX_TOOLCHAIN_OPTIONS}"
-
-# Remove -rpath-link
-BUILDSDK_LDFLAGS = " \
- -L${STAGING_LIBDIR} \
- -Wl,-rpath,${libdir} \
- -L${STAGING_DIR_HOST}${base_libdir} \
- -Wl,-rpath,${base_libdir} \
-"
-
-MACHINEOVERRIDES .= ":darwinsdk"
+require darwin-common.inc
--
2.43.0
prev parent reply other threads:[~2025-05-27 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 13:24 [meta-darwin][PATCH 1/2] gcc: rely on loader_path instead of rpath ecordonnier
2025-05-27 13:24 ` ecordonnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250527132415.2160472-2-ecordonnier@snap.com \
--to=ecordonnier@snap.com \
--cc=dominik@snap.com \
--cc=yocto-patches@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.