Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796031855; b=NmPeIDqt4Kl1GptxVyYVO+P/bFg6sVZ/ReBvEUORwNGfvovo2YVcTvX+quS/ZV1A50kn pE3QGNMIHu/PmQG5NAIUQ1fRU6yOr7yhsDpmAc4z5u4mfcsdR/Zwav6QT67zTk8PHr8hn VZlJ5Z9CYrzxuMn47aX6uNmFAMzbpwuPDwQjf56r4tPaoUYjBHu1yiRYXlvwUh3fzwM5n 0KcxKtJSn5IShVpLpf+m/gfZQB8B3QUrqUFOP9BDJ2zRSs/uzJJxhKJr2v8kpXxsUGD6D lDw/21tmEI5IDyNGLCVpX2wFNlli+PhjsAY7Pq7h4EeuW9GH+1aDNcE1EaZ8kyJnVtA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796031855; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=Lkyuh+Yh0XBfItaInbRzWr+FMQ0/P1lGuT2HG8qSCeA=; b=5r+XhVp16haxvCIOXV1TUvWnlG1VrmnZ2QJIf809MhwMQTgZDVqHzwHJVJwKSNLrrYwT ZTxp96bHE/4DW/VRocytFgfZUx9WUjG3K0iiHPumqV20GMi7vzc8tQbQ4pTXGIlpj7HzC j++onBYzGnLO2FCUJUZEiLa2f87V7RSp9XkafuAmfcPwbNbRfKNcbDjTxqQR5urMWtnD9 rNMezbG9b3+OwxDw7FfqPYRsoWZJ2VBeYs7K9VsZ+jfTtxZXggJ3rFo6rFb/R6KD9T+2t ZeDHrCowq6R40qLzthTuG3/B/O4+p4gPHRhc8SnyihZ9GDSo7m5tKLyX+gSprBGloZA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=CD6pPxYw; arc=none smtp.remote-ip=209.85.218.46 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70C36606A31C for ; Mon, 30 Nov 2026 09:44:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 70C36606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=CD6pPxYw Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-c4d581da0aaso1374215766b.2 for ; Mon, 30 Nov 2026 01:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20260707; t=1796031854; x=1796636654; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Lkyuh+Yh0XBfItaInbRzWr+FMQ0/P1lGuT2HG8qSCeA=; b=CD6pPxYwSmfEnsN2hi2vqrwqk0FTG3vQscByPseaVG+j7t5uSV3Dbokx5VvYoQ1w0t A9It1KADG/tm2pX25m/gRJNDlMJkxniR7gaHug0HIYcyCfzHiPbSRg2HlGPq0L2h5biX ywBhCKwoP7FpFGhttRk4U13equ2YstNv2PY5OGkETTYHIhRTRqk6sq+EBMQzUWQICeRp TAbmSkV53h9J23KRe7khoIXx2gx0qkbx+8emD7etxz2E9KtJie4SqSzEXl+E1AeIhwAp mKQ4t7EGOCTkaS/B7YscBq42ezwZiUaRBpF2oDX0TCPXoN5lpiJNMxBQQPQM9atrIf31 mZVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796031854; x=1796636654; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Lkyuh+Yh0XBfItaInbRzWr+FMQ0/P1lGuT2HG8qSCeA=; b=QcfVovVmzfNlnsu03IjanZzIvACgWwNA0Mg/2yk26tYjk14LOPNXzKGpeCk2A8iA4P 6jzDK25O604KnJSfmRDylzHJOO94O98X77CvIvp4GI0WH3NXAfbWCPhg0VbZ5Mp6HNWr vqIaUiZphu8liMD+DO2lTv/gjMqMs3nWWskaM937hnmOTPC1MXbs9ndSz3GIYiz1nAe6 +e8QXpz7TccebtNITnuVx06iadqttmla84PmpQvSCsBTBA9/oZczDcdzqtQLsATfpo5n qZBT/3CUXKqj9U+Ga4diq1k/eHQ5r4Wwfus2dzUfnCpJC5qt8Z0Chrfl9fuJ5YiicSUt n+Hw== X-Gm-Message-State: APuU4Z+ssSH82g7PUhpMY0CBdlc4FUTa2KYoX0cInrwVNDIkS+YSLQKV 0zPjH0UVH8C2spN3NCnLuA/eXf06qqTlpw8JLo1T/tfu2iJLpedeVo6OfN9Dxw== X-Gm-Gg: AZFdTZePiYr+U1zWt8Gey1tP9Y9aqV5xurL0NK3hG5DTOkr4mOkpivqxgOm0B+OjOa/ DTPEEwlL0WVUBX/VTTxcM+XSLUVOcikgZM9iyxGLCR6nX+4Z/fap7rF43G9FuYV4950hFfiLmBW TtEpl7MbEYg2jgSJis3ZyBPfE2R0I2evsRQbllMbNCA+QQF3E9GOJqgws0abPc8df1Te31mUi/u b3GaVo7BLUDYQcKVtFX8ycQ1XtbeDee3knW4nu2tl0Up7ccpPQ5WoyxM4VqJJMWK9xPFRkMxgSn D3BHTiYEOksG2xx4g81fds5/1PlMcyplwd9/rENy1+KznKvBvO9pS6+m1Z5qXOD93VAxPeRyspa rLwab1iIuoeQePiS5GMDmJnWwuGoiBdUi2RI7as+QMWCE37qwlNm3gYAZ5Cg5xIk/QpPkTWlowf ofdIOf2RZTWdW4lYpCBhL7BT0Zi7p3pzUS3vJOgmK9Ao46Myn9OeXoUw2MdwXfJ197pxxZVAabZ M/PO+zlG8drOEhL6bWT9RKG7C4ujG+kgBG5V1lrd1tvzAA0gUQUUMagiJuZdGuNEU7MaVgg9onT XeH+MB3q+WDmTi0S8viv+fvjlx3KmFHTaXbhm83n1m1ljyKHins7ZwZm6IyMx641JrO6zOvSPBQ duMt1UhY6 X-Received: by 2002:a17:906:785:b0:c43:ae92:9ad with SMTP id a640c23a62f3a-c513a999796mr2073434566b.17.1796031853684; Mon, 30 Nov 2026 01:44:13 -0800 (PST) Received: from development2.visionsystems.local (mail.visionsystems.de. [213.209.99.202]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513acfe25asm1137439566b.11.2026.11.30.01.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 01:44:13 -0800 (PST) From: Yegor Yefremov To: xenomai@lists.linux.dev Cc: Jan Kiszka , Florian Bezdeka , Yegor Yefremov Subject: [PATCH v3 0/5] Cobalt build and time64 fixes for uClibc-ng Date: Mon, 30 Nov 2026 10:44:07 +0100 Message-Id: <20261130094412.1802041-1-yegorslists@googlemail.com> X-Mailer: git-send-email 2.34.1 X-Mailing-List: xenomai@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cobalt has not built with uClibc-ng since v3.1.1. Patches 1 and 5 fix the build. Patches 2-4 fix the places that pick the time64 variant of a kernel interface by checking __TIMESIZE, which only glibc defines: the clock_gettime() vDSO call, the select() wrapper and the clocktest reference clock. On 32-bit uClibc-ng and musl with 64-bit time_t, these used the 32-bit interfaces with 64-bit structures. The other __TIMESIZE users (the symbol redirections in include/cobalt/wrappers.h and include/cobalt/pthread.h, and the *_time64 variant of pthread_timedmutex_lock_interruptible_np() in lib/cobalt/wrappers_time64.c) are about glibc providing both 32-bit and *64 symbols, so they stay glibc-only. Tested with Buildroot's test-pkg on next plus the series, building Cobalt with the testsuite, RTCAN, Analogy and the pSOS and VxWorks skins: - armv5 uClibc-ng 1.0.59 (time64), GCC 15 - armv7 glibc 2.44, GCC 16 - aarch64 glibc 2.24, GCC 6 I also checked with a small test program that XN_TIME64_ON_32BIT is defined for armv5 uClibc-ng (time64), armv7 and i686 musl, and armv7 glibc with _TIME_BITS=64, and is not defined for armv7 glibc without it, aarch64 glibc and x86_64 musl. musl still doesn't build, for the reasons listed in the v2 cover letter. Since e14e0e562 ("configure.ac: Fix typo") enables -O2 again, two more errors show up with musl: the __OPTIMIZE__ branch of include/cobalt/uapi/signal.h uses glibc's siginfo_t._sifields and sigevent_t, and GCC 15 reports '*val' may be used uninitialized in lib/analogy/math.c:166 (-Werror). Neither comes from this series. Changes v2 -> v3: - Added XN_TIME64_ON_32BIT and used it for the vDSO selection, the select() wrapper (new patch 3) and the clocktest (new patch 4) (Florian). - No special case for x32, as Xenomai no longer supports it (Jan). - Rebased on next. Changes v1 -> v2: - Dropped the getauxval() fallback for uClibc-ng < 1.0.43 (Jan). - Checked the series with musl. Yegor Yefremov (5): lib/cobalt: Don't rely on glibc's __OPEN_NEEDS_MODE lib/cobalt: Select the time64 vDSO call without __TIMESIZE lib/cobalt: Use the time64 select() path without __TIMESIZE testsuite/clocktest: Read the reference clock with time64 without __TIMESIZE testsuite/smokey/y2038: Define ADJ_SETOFFSET if missing include/cobalt/wrappers.h | 14 ++++++++++++++ lib/cobalt/arch/arm/include/asm/xenomai/time.h | 4 +++- lib/cobalt/arch/arm64/include/asm/xenomai/time.h | 4 +++- lib/cobalt/arch/x86/include/asm/xenomai/time.h | 4 +++- lib/cobalt/rtdm.c | 14 ++++++++++---- lib/cobalt/wrappers_time64.c | 6 +++--- testsuite/clocktest/clocktest.c | 2 +- testsuite/smokey/y2038/syscall-tests.c | 5 +++++ 8 files changed, 42 insertions(+), 11 deletions(-) -- 2.34.1