From patchwork Wed Jan 28 06:32:00 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: 79914 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 7A56ED35682 for ; Wed, 28 Jan 2026 06:32:20 +0000 (UTC) Received: from host.hernesphere.com (host.hernesphere.com [3.13.130.34]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.7392.1769581939706549745 for ; Tue, 27 Jan 2026 22:32:20 -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 (unknown [50.216.236.226]) by host.hernesphere.com (Postfix) with ESMTPSA id 6D255106C68; Wed, 28 Jan 2026 00:32:15 -0600 (CST) Authentication-Results: host.hernesphere.com; spf=pass (sender IP is 50.216.236.226) 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" , "Eric L. Hernes" Subject: [meta-darwin][PATCH] Add GDB and CLANG (conditionally) to the SDK builds Date: Tue, 27 Jan 2026 22:32:00 -0800 Message-ID: <20260128063200.99314-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 ; Wed, 28 Jan 2026 06:32:20 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/3124 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. Signed-off-by: Eric L. Hernes --- .../openssl/openssl_%.bbappend | 25 +++++++++++++++++++ .../nativesdk-packagegroup-sdk-host.bbappend | 3 +++ .../packagegroup-cross-canadian.bbappend | 5 ++++ .../gcc/gcc-cross-canadian_%.bbappend | 2 +- .../gdb/gdb-cross-canadian_%.bbappend | 19 ++++++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-) 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..3b0674c --- /dev/null +++ b/recipes-connectivity/openssl/openssl_%.bbappend @@ -0,0 +1,25 @@ + +do_configure:darwin21 () { + target="${@'darwin64-arm64-cc' if d.getVar('SDK_ARCH') == 'aarch64' else 'darwin64-x86_64-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/gcc/gcc-cross-canadian_%.bbappend b/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend index 192ee0d..5a4b8f9 100644 --- a/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend +++ b/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend @@ -3,7 +3,7 @@ ELFUTILS:darwinsdk = "" EXTRA_OECONF:append:darwinsdk = " \ --with-gmp=${STAGING_EXECPREFIXDIR} \ - --with-mpft=${STAGING_EXECPREFIXDIR} \ + --with-mpfr=${STAGING_EXECPREFIXDIR} \ --with-mpc=${STAGING_EXECPREFIXDIR} \ " diff --git a/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend b/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend new file mode 100644 index 0000000..3f69019 --- /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-mpfr=${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"