From patchwork Tue Jan 20 17:04:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eric L. Hernes" X-Patchwork-Id: 79232 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B043CA5FB8 for ; Tue, 20 Jan 2026 17:05:18 +0000 (UTC) Received: from host.hernesphere.com (host.hernesphere.com [3.13.130.34]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.11277.1768928713394046415 for ; Tue, 20 Jan 2026 09:05:13 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: qinc.tv, ip: 3.13.130.34, mailfrom: dev@qinc.tv) X-Virus-Scanned: Debian amavisd-new at host.hernesphere.com Received: from localhost.localdomain (165-23-88-160-dynamic.midco.net [165.23.88.160]) by host.hernesphere.com (Postfix) with ESMTPSA id 34270106C29; Tue, 20 Jan 2026 11:05:10 -0600 (CST) Authentication-Results: host.hernesphere.com; spf=pass (sender IP is 165.23.88.160) smtp.mailfrom=dev@qinc.tv smtp.helo=localhost.localdomain Received-SPF: pass (host.hernesphere.com: connection is authenticated) X-Virus-Scanned: Debian amavisd-new at host.hernesphere.com From: "Eric L. Hernes" To: yocto-patches@lists.yoctoproject.org Cc: "Eric L. Hernes" Subject: [meta-darwin][PATCH] Add GDB and CLANG (conditionally) to the SDK builds Date: Tue, 20 Jan 2026 11:04:59 -0600 Message-ID: <20260120170459.95161-1-dev@qinc.tv> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 20 Jan 2026 17:05:18 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/3035 From: "Eric L. Hernes" GDB and CLANG are not included in the SDK builds on Darwin. This patch adds them. GDB is added to the packagegroup files. I had to disable some of the advanced options for gdb to get a compile. CLANG is added conditionally from the `CLANGSDK=1` variable. This also was missing from the *packagegroup* files. commit f68c74645010c413601ed4766f702c93e8b111f7 Author: Eric L. Hernes Date: Mon Jan 19 11:45:13 2026 -0600 patches to enable CLANGSDK and gdb on darwinsdk builds commit da00745de4531722df9b955892c5835a7c26c03f Author: Eric L. Hernes Signed-off-by: Eric L. Hernes Date: Mon Jan 19 09:54:57 2026 -0600 additional patch for gcc to build on arm64 build for arm64 host --- .../openssl/openssl_%.bbappend | 25 +++++++++++++++++++ .../nativesdk-packagegroup-sdk-host.bbappend | 3 +++ .../packagegroup-cross-canadian.bbappend | 5 ++++ .../gdb/gdb-cross-canadian_%.bbappend | 19 ++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 recipes-connectivity/openssl/openssl_%.bbappend create mode 100644 recipes-devtools/gdb/gdb-cross-canadian_%.bbappend diff --git a/recipes-connectivity/openssl/openssl_%.bbappend b/recipes-connectivity/openssl/openssl_%.bbappend new file mode 100644 index 0000000..befbc64 --- /dev/null +++ b/recipes-connectivity/openssl/openssl_%.bbappend @@ -0,0 +1,25 @@ + +do_configure:darwin21 () { + target=darwin64-arm64-cc + + useprefix=${prefix} + if [ "x$useprefix" = "x" ]; then + useprefix=/ + fi + # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the + # environment variables set by bitbake. Adjust the environment variables instead. + PERLEXTERNAL="$(realpath ${S}/external/perl/Text-Template-*/lib)" + test -d "$PERLEXTERNAL" || bberror "PERLEXTERNAL '$PERLEXTERNAL' not found!" + HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="$PERLEXTERNAL" \ + perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-3 --libdir=${libdir} $target + perl ${B}/configdata.pm --dump +} + +RDEPENDS:remove:${PN}-misc = "perl" +RDEPENDS:remove:${PN}-ptest = "openssl-bin" +RDEPENDS:remove:${PN}-ptest = "perl" +RDEPENDS:remove:${PN}-ptest = "perl-modules" +RDEPENDS:remove:${PN}-ptest = "bash" +RDEPENDS:remove:${PN}-ptest = "sed" +RDEPENDS:remove:${PN}-ptest = "openssl-engines" +RDEPENDS:remove:${PN}-ptest = "openssl-ossl-module-legacy" diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend index 170a8c1..d1191e7 100644 --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -4,3 +4,6 @@ RDEPENDS:${PN}:darwin21 = "\ nativesdk-bison \ nativesdk-sdk-provides-dummy \ " + +RDEPENDS:${PN}:darwin21 += "${@bb.utils.contains('CLANGSDK', '1', 'nativesdk-clang', '', d)}" + diff --git a/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend index de29f47..4e46eae 100644 --- a/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend +++ b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend @@ -1,9 +1,14 @@ # Use indirection to stop these being expanded prematurely BINUTILS = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}" GCC = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}" +GDB = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" +CLANG = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}" RDEPENDS:${PN}:darwinsdk = "\ ${@all_multilib_tune_values(d, 'BINUTILS')} \ ${@all_multilib_tune_values(d, 'GCC')} \ + ${GDB} \ meta-environment-${MACHINE} \ " + +RDEPENDS:${PN}:darwinsdk += "${@bb.utils.contains('CLANGSDK', '1', '${CLANGCROSSCANADIANDEPS}', '', d)}" diff --git a/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend b/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend new file mode 100644 index 0000000..99dac80 --- /dev/null +++ b/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend @@ -0,0 +1,19 @@ +PACKAGECONFIG:remove = "python" +PACKAGECONFIG:remove = "debuginfod" + +EXTRA_OECONF:append:darwinsdk = " \ + --with-gmp=${STAGING_EXECPREFIXDIR} \ + --with-mpft=${STAGING_EXECPREFIXDIR} \ + --with-mpc=${STAGING_EXECPREFIXDIR} \ +" + +EXTRA_OECONF:remove:darwinsdk = "--disable-gas" +EXTRA_OECONF:remove:darwinsdk = "--disable-binutils" +EXTRA_OECONF:remove:darwinsdk = "--disable-ld" +EXTRA_OECONF:remove:darwinsdk = "--disable-gold" +EXTRA_OECONF:remove:darwinsdk = "--with-system-readline" + +# Remove -rpath-link and -rpath +LDFLAGS:darwinsdk = "${BUILDSDK_LDFLAGS}" + +INSANE_SKIP:append:darwin21 = " buildpaths"