{"id":2228387,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2228387/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/patch/20260426114429.1196358-1-bernd@kuhls.net/","project":{"id":27,"url":"http://patchwork.ozlabs.org/api/1.1/projects/27/?format=json","name":"Buildroot development","link_name":"buildroot","list_id":"buildroot.buildroot.org","list_email":"buildroot@buildroot.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260426114429.1196358-1-bernd@kuhls.net>","date":"2026-04-26T11:44:29","name":"[1/1] package/sqlite: Fix build on riscv32","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"9248a27f7bee6f6b38ea7f0a3bf5f95eeffb1491","submitter":{"id":86624,"url":"http://patchwork.ozlabs.org/api/1.1/people/86624/?format=json","name":"Bernd Kuhls","email":"bernd@kuhls.net"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/buildroot/patch/20260426114429.1196358-1-bernd@kuhls.net/mbox/","series":[{"id":501528,"url":"http://patchwork.ozlabs.org/api/1.1/series/501528/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/list/?series=501528","date":"2026-04-26T11:44:29","name":"[1/1] package/sqlite: Fix build on riscv32","version":1,"mbox":"http://patchwork.ozlabs.org/series/501528/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2228387/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2228387/checks/","tags":{},"headers":{"Return-Path":"<buildroot-bounces@buildroot.org>","X-Original-To":["incoming-buildroot@patchwork.ozlabs.org","buildroot@buildroot.org"],"Delivered-To":["patchwork-incoming-buildroot@legolas.ozlabs.org","buildroot@buildroot.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=buildroot.org header.i=@buildroot.org\n header.a=rsa-sha256 header.s=default header.b=YmAfHawO;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org\n (client-ip=140.211.166.137; helo=smtp4.osuosl.org;\n envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org)"],"Received":["from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g3Pxl44MBz1xvV\n\tfor <incoming-buildroot@patchwork.ozlabs.org>;\n Sun, 26 Apr 2026 21:44:41 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 565A8425E9;\n\tSun, 26 Apr 2026 11:44:39 +0000 (UTC)","from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id nZ6S-D2LwaW2; Sun, 26 Apr 2026 11:44:38 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 343A2428BB;\n\tSun, 26 Apr 2026 11:44:38 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists1.osuosl.org (Postfix) with ESMTP id EC4D5231\n for <buildroot@buildroot.org>; Sun, 26 Apr 2026 11:44:36 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id CBA4761B4C\n for <buildroot@buildroot.org>; Sun, 26 Apr 2026 11:44:36 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id x6KqJKctPI6b for <buildroot@buildroot.org>;\n Sun, 26 Apr 2026 11:44:35 +0000 (UTC)","from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 0C9846132D\n for <buildroot@buildroot.org>; Sun, 26 Apr 2026 11:44:34 +0000 (UTC)","from fli4l.lan.fli4l (p4fd6c5b2.dip0.t-ipconnect.de\n [79.214.197.178])\n by dd20012.kasserver.com (Postfix) with ESMTPSA id 1145DA4C0F11\n for <buildroot@buildroot.org>; Sun, 26 Apr 2026 13:44:30 +0200 (CEST)","from bruckner.lan.fli4l ([192.168.1.1]:42284)\n by fli4l.lan.fli4l with esmtp (Exim 4.99.1)\n (envelope-from <bernd@kuhls.net>) id 1wGxuW-000000001mD-3uSq\n for buildroot@buildroot.org; Sun, 26 Apr 2026 11:44:29 +0000"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp4.osuosl.org 343A2428BB","OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0C9846132D"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=buildroot.org;\n\ts=default; t=1777203878;\n\tbh=CAvTFeQlMBdpR6QaOjsMcQMtOeQ/JJX36zAVV1bPZLQ=;\n\th=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=YmAfHawO/VqoKtU6I4yfOVXs9bVZhExJ3eLA5/CSpM/1NHp6ATgY/UclJHFYPgBcO\n\t iH3NCOtRGeQmQ6sWoT7rll0D89ezG87QTzAjqvmLGViyflk7KmHEw5M6shCqlK1X6f\n\t 1vBqT+4EDaPYXEnk0Q4+FaVBpmY6p+VHwdrB5bmJFPCss+tq7Hz6cK3eB+Ts+rPhl4\n\t n2qL9chkyYZNjo9LzzO9AydRSt3rI3peUL9MoKKT2mjA8Wk/Y90643N9BCMgKZ4Wcd\n\t 0f52afB/IhHb7gJxvs3ev2L5wOPSXpeoguuc8NMmifi/kIzhyn6+W4xeNqxtq8UE6b\n\t L3eOKkFKNu0kQ==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=85.13.140.57;\n helo=dd20012.kasserver.com; envelope-from=bernd@kuhls.net;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp3.osuosl.org 0C9846132D","From":"Bernd Kuhls <bernd@kuhls.net>","To":"buildroot@buildroot.org","Date":"Sun, 26 Apr 2026 13:44:29 +0200","Message-ID":"<20260426114429.1196358-1-bernd@kuhls.net>","X-Mailer":"git-send-email 2.47.3","MIME-Version":"1.0","X-Spamd-Bar":"/","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=kuhls.net;\n s=kas202511301023; t=1777203871;\n bh=Psyr7znqeFj7EkXx1Jp9aI7XB2QPUupwf8a48MVVpv4=;\n h=From:To:Subject:Date:From;\n b=lIMk2D6pSvMrwnUy5rE4RNLL98VXuVA0e6Eb7e6aI+3aYjRBjm7M29k734Gc++rlJ\n Lw9ENWy7lf0cLASIKuJdTjYlBhbqj6snt14SWB7NMt+LagdM7QGGgNA5bct+OcEId+\n 5PnbG+3RbjyiIQFYCbatldN/Mzf+/7gS1t9KhuYpEVRqG6iGfyy2O2MoELy3jwf/Ux\n 5JGCLayYAKz9vyJ+K4OBOqT6ghBADR0+ELMAfv7GC/gRxQMEjNn8vF0jIdekQBC534\n 3Q9ZxxP3o/GT3AC1ZMZQYuVCRVGJUO/6Jo7ygrmamkPYl9GsWseAypRsTL1TkzNP0P\n o3RsB7zcMXdoA==","X-Mailman-Original-Authentication-Results":["smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=kuhls.net","smtp3.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256\n header.s=kas202511301023 header.b=lIMk2D6p"],"Subject":"[Buildroot] [PATCH 1/1] package/sqlite: Fix build on riscv32","X-BeenThere":"buildroot@buildroot.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.buildroot.org>","List-Unsubscribe":"<https://lists.buildroot.org/mailman/options/buildroot>,\n <mailto:buildroot-request@buildroot.org?subject=unsubscribe>","List-Archive":"<http://lists.buildroot.org/pipermail/buildroot/>","List-Post":"<mailto:buildroot@buildroot.org>","List-Help":"<mailto:buildroot-request@buildroot.org?subject=help>","List-Subscribe":"<https://lists.buildroot.org/mailman/listinfo/buildroot>,\n <mailto:buildroot-request@buildroot.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@buildroot.org","Sender":"\"buildroot\" <buildroot-bounces@buildroot.org>"},"content":"Buildroot commit 7cf7140b4832d1281fd352893d3f7cfc92e8eef3 bumped the\npackage from 3.51.3 to 3.53.0. Version 3.52.0 contains upstream commit\nhttps://github.com/sqlite/sqlite/commit/db84cdb747ac926d3f272933386fc6196c40cb19\nwhich added the usage off __uint128_t with a dependency on, among\nothers, __riscv. This matches riscv32 and riscv64 but only riscv64 has\n__uint128_t defined.\n\nFixes:\nhttps://autobuild.buildroot.net/results/a6e/a6e4f391081c8059d93fb5b7bd33e08c57b27dcf/\n\nSigned-off-by: Bernd Kuhls <bernd@kuhls.net>\n---\n ...of-intrinsic-high-precision-multipli.patch | 54 +++++++++++++++++++\n 1 file changed, 54 insertions(+)\n create mode 100644 package/sqlite/0001-Disable-the-use-of-intrinsic-high-precision-multipli.patch","diff":"diff --git a/package/sqlite/0001-Disable-the-use-of-intrinsic-high-precision-multipli.patch b/package/sqlite/0001-Disable-the-use-of-intrinsic-high-precision-multipli.patch\nnew file mode 100644\nindex 0000000000..30c23791b6\n--- /dev/null\n+++ b/package/sqlite/0001-Disable-the-use-of-intrinsic-high-precision-multipli.patch\n@@ -0,0 +1,54 @@\n+From 0bfc92a2df5ec80f466df884de7225517febfe56 Mon Sep 17 00:00:00 2001\n+From: Bernd Kuhls <bernd@kuhls.net>\n+Date: Sun, 26 Apr 2026 13:28:13 +0200\n+Subject: [PATCH] Disable the use of intrinsic high-precision multiplies on\n+ riscv32\n+\n+Build is broken in riscv32:\n+\n+/home/vincent/autobuild/instance-3/output-1/build/sqlite-3.53.0/sqlite3.c:\n+ In function 'sqlite3Multiply128':\n+/home/vincent/autobuild/instance-3/output-1/build/sqlite-3.53.0/sqlite3.c:36804:3:\n+ error: unknown type name '__uint128_t'; did you mean '__uint32_t'?\n+36804 |   __uint128_t r = (__uint128_t)a * b;\n+\n+as reported by the buildroot autobuilders:\n+https://autobuild.buildroot.net/results/a6e/a6e4f391081c8059d93fb5b7bd33e08c57b27dcf//build-end.log\n+\n+For a discussion about the preprocessor definitions see:\n+https://github.com/riscv-android-src/platform-bionic/issues/10\n+\n+Upstream: https://github.com/sqlite/sqlite/pull/44\n+\n+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>\n+---\n+ sqlite3.c | 6 ++++--\n+ 1 file changed, 4 insertions(+), 2 deletions(-)\n+\n+diff --git a/sqlite3.c b/sqlite3.c\n+index c75c19cc21..2573937567 100644\n+--- a/sqlite3.c\n++++ b/sqlite3.c\n+@@ -36799,7 +36799,8 @@ u8 sqlite3StrIHash(const char *z){\n+ */\n+ static u64 sqlite3Multiply128(u64 a, u64 b, u64 *pLo){\n+ #if (defined(__GNUC__) || defined(__clang__)) \\\n+-        && (defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)) \\\n++        && (defined(__x86_64__) || defined(__aarch64__) \\\n++            || (defined(__riscv) && (__riscv_xlen == 64))) \\\n+         && !defined(SQLITE_DISABLE_INTRINSIC)\n+   __uint128_t r = (__uint128_t)a * b;\n+   *pLo = (u64)r;\n+@@ -36835,7 +36836,8 @@ static u64 sqlite3Multiply128(u64 a, u64 b, u64 *pLo){\n+ */\n+ static u64 sqlite3Multiply160(u64 a, u32 aLo, u64 b, u32 *pLo){\n+ #if (defined(__GNUC__) || defined(__clang__)) \\\n+-        && (defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)) \\\n++        && (defined(__x86_64__) || defined(__aarch64__) \\\n++            || (defined(__riscv) && (__riscv_xlen == 64))) \\\n+         && !defined(SQLITE_DISABLE_INTRINSIC)\n+   __uint128_t r = (__uint128_t)a * b;\n+   r += ((__uint128_t)aLo * b) >> 32;\n+-- \n+2.47.3\n+\n","prefixes":["1/1"]}