From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.8512.1796279920949603853 for ; Wed, 02 Dec 2026 22:38:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=MA7XD52S; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id DF4291A1909; Thu, 3 Dec 2026 06:38:38 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A3EE7604ED; Thu, 3 Dec 2026 06:38:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 75D9611EA1C59; Thu, 03 Dec 2026 07:38:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796279918; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=rezTdHTeN49GAu4d8dsQw1vjYVvn1w0CIoWFb6XIwFk=; b=MA7XD52SGgcgIxbhVwPq9ypFbL4eDw4jyZ7w7Qww3WBGzVzECZCaZ5vbeFc7GGj6ezILhf kJMvDmArES3DKagwkJPA3W5O/gYCS46BeMqsZCgTmaAgzeaXZSJcYK4pa+h6ByFj/dVivc urwDZaOEqbMVFzxBwGgxJ6oz6Z/OWMnpTy/oN4MXWVEN1IwzQ29o95kfyrUcaSa73bAr/+ 257lRe0gFGE/xBumdr5isZM1aMLf4RJxMLJz10HD5m/fb4lC0LXGaOJ7+KNpcMowRO/LxP L5Ui/v1MVLkJPIe0EEJq5GwYDH6wJSB117WpkKQD/v5WEmoXNAJo9bcKJg4xYA== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 03 Dec 2026 07:38:35 +0100 Message-Id: From: "Mathieu Dubois-Briand" To: "Marco Felsch" , Subject: Re: [OE-core] [PATCH] rust: enable fully static linking with TCLIBC=glibc Cc: , "Marco Felsch" X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20261130-mfe-rust-static-glibc-v1-1-5c24d978d5ef@pengutronix.de> In-Reply-To: <20261130-mfe-rust-static-glibc-v1-1-5c24d978d5ef@pengutronix.de> X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 03 Dec 2026 06:38:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251874 On Mon Nov 30, 2026 at 9:29 PM CET, Marco Felsch wrote: > From: Marco Felsch > > Rust binaries built with TCLIBC=3Dglibc and -C target-feature=3D+crt-stat= ic > were still dynamically linked, because the generated target spec only set > crt-static-respected for musl, so rustc ignored +crt-static. Upstream rus= tc > sets it for all Linux targets (base/linux.rs), so do the same. No other > change is needed: with crt-static the libc and unwind crates statically > link libc, libm, libpthread, libdl, librt, libutil, libgcc_eh and libgcc, > which glibc and libgcc already provide in the target sysroot. > > Rename rust-static-musl-test to rust-static-test and RustStaticMuslTest t= o > RustStaticTest with a musl and a new glibc test, as the same check applie= s > to both. > > Signed-off-by: Marco Felsch > --- > Add the moment only musl supports static builds albeit everything is in > place to static link against glibc as well. Of course the static linked > binary is not as small as musl builds, but a BSP can avoid multiconfig > setups. > > I've tested this with rsinit, a Rust based initrd application which > requires only a dm-verity params file in addition to the static linked > Rust binary bundled as CPIO. > > Regards, > Marco Hi Marco, It looks like the added test is failing on ARM host: 2026-12-02 22:03:55,845 - oe-selftest - INFO - ... FAIL 2026-12-02 22:03:55,845 - oe-selftest - INFO - 1: 49/54 804/840 (46.30s) (1= failed) (rust.RustStaticTest.test_static_glibc_linking) 2026-12-02 22:03:55,845 - oe-selftest - INFO - testtools.testresult.real._S= tringException: Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openem= bedded-core/meta/lib/oeqa/selftest/cases/rust.py", line 184, in test_static= _glibc_linking self.check_static_linking("glibc") File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openem= bedded-core/meta/lib/oeqa/selftest/cases/rust.py", line 167, in check_stati= c_linking self.assertEqual(result.status, 0, File "/usr/lib64/python3.12/unittest/case.py", line 885, in assertEqual assertion_func(first, second, msg=3Dmsg) File "/usr/lib64/python3.12/unittest/case.py", line 878, in _baseAssertEq= ual raise self.failureException(msg) AssertionError: 1 !=3D 0 : bitbake rust-static-test failed: https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/5420 Can you have a look at the issue? Thanks, Mathieu --=20 Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com