All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] RISC-V: implement private GCC library
@ 2025-12-01 17:47 Heinrich Schuchardt
  2025-12-01 17:47 ` [PATCH 1/2] " Heinrich Schuchardt
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Heinrich Schuchardt @ 2025-12-01 17:47 UTC (permalink / raw)
  To: Rick Chen, Leo
  Cc: Yao Zi, E Shattow, Hal Feng, Mayuresh Chitale, Minda Chen, u-boot,
	Heinrich Schuchardt

We currently include libgcc.a when building for the RISC-V architecture.
For instance lib/mbedtls/external/mbedtls/library/bignum.c uses __ctzdi2().

At least the Ubuntu Linux distribution has switched to building libgcc.a
for the RVA23S64 profile. Using this library on RVA20 systems results in
crashes. We therefore need a private replacement library.

With the series a private GCC library and unit tests are provided for
64-bit RISC-V. This is enough to build for CONFIG_WGET_HTTPS as suggested
in E's patch

[PATCH] configs: starfive: enable wget https
https://lore.kernel.org/u-boot/20251112005451.41285-1-e@freeshell.de/

Heinrich Schuchardt (2):
  RISC-V: implement private GCC library
  test: provide unit tests for the RISC-V private GCC library

 arch/Kconfig            |   1 +
 arch/riscv/lib/Makefile |   2 +
 arch/riscv/lib/clz.c    | 105 ++++++++++++++++++++++++++++++++++++++++
 arch/riscv/lib/ctz.c    |  97 +++++++++++++++++++++++++++++++++++++
 lib/Kconfig             |   2 +-
 test/lib/Makefile       |   4 ++
 test/lib/test_clz.c     |  53 ++++++++++++++++++++
 test/lib/test_ctz.c     |  53 ++++++++++++++++++++
 8 files changed, 316 insertions(+), 1 deletion(-)
 create mode 100644 arch/riscv/lib/clz.c
 create mode 100644 arch/riscv/lib/ctz.c
 create mode 100644 test/lib/test_clz.c
 create mode 100644 test/lib/test_ctz.c

-- 
2.51.0


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/2] RISC-V: implement private GCC library
@ 2025-12-01 17:49 Heinrich Schuchardt
  2025-12-01 17:49 ` [PATCH 1/2] " Heinrich Schuchardt
  0 siblings, 1 reply; 13+ messages in thread
From: Heinrich Schuchardt @ 2025-12-01 17:49 UTC (permalink / raw)
  To: Rick Chen, Leo
  Cc: Yao Zi, E Shattow, Hal Feng, Mayuresh Chitale, Minda Chen, u-boot,
	Heinrich Schuchardt

We currently include libgcc.a when building for the RISC-V architecture.
For instance lib/mbedtls/external/mbedtls/library/bignum.c uses __ctzdi2().

At least the Ubuntu Linux distribution has switched to building libgcc.a
for the RVA23S64 profile. Using this library on RVA20 systems results in
crashes. We therefore need a private replacement library.

With the series a private GCC library and unit tests are provided for
64-bit RISC-V. This is enough to build for CONFIG_WGET_HTTPS as suggested
in E's patch

[PATCH] configs: starfive: enable wget https
https://lore.kernel.org/u-boot/20251112005451.41285-1-e@freeshell.de/

Heinrich Schuchardt (2):
  RISC-V: implement private GCC library
  test: provide unit tests for the RISC-V private GCC library

 arch/Kconfig            |   1 +
 arch/riscv/lib/Makefile |   2 +
 arch/riscv/lib/clz.c    | 105 ++++++++++++++++++++++++++++++++++++++++
 arch/riscv/lib/ctz.c    |  97 +++++++++++++++++++++++++++++++++++++
 lib/Kconfig             |   2 +-
 test/lib/Makefile       |   4 ++
 test/lib/test_clz.c     |  53 ++++++++++++++++++++
 test/lib/test_ctz.c     |  53 ++++++++++++++++++++
 8 files changed, 316 insertions(+), 1 deletion(-)
 create mode 100644 arch/riscv/lib/clz.c
 create mode 100644 arch/riscv/lib/ctz.c
 create mode 100644 test/lib/test_clz.c
 create mode 100644 test/lib/test_ctz.c

-- 
2.51.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-12-04 11:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 17:47 [PATCH 0/2] RISC-V: implement private GCC library Heinrich Schuchardt
2025-12-01 17:47 ` [PATCH 1/2] " Heinrich Schuchardt
2025-12-04 11:53   ` Leo Liang
2025-12-04 11:54   ` Leo Liang
2025-12-01 17:47 ` [PATCH 2/2] test: provide unit tests for the RISC-V " Heinrich Schuchardt
2025-12-02 12:25 ` [PATCH 0/2] RISC-V: implement " Mark Kettenis
  -- strict thread matches above, loose matches on Subject: below --
2025-12-01 17:49 Heinrich Schuchardt
2025-12-01 17:49 ` [PATCH 1/2] " Heinrich Schuchardt
2025-12-02  3:57   ` Yao Zi
2025-12-02  4:59     ` Heinrich Schuchardt
2025-12-02  5:28     ` Icenowy Zheng
2025-12-02  6:15       ` Heinrich Schuchardt
2025-12-02  7:03         ` Icenowy Zheng
2025-12-02 10:02           ` Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.