* [Buildroot] [PATCH] package/uclibc: disable SSP support for riscv32
@ 2026-08-15 12:10 Romain Naour via buildroot
2026-08-15 19:21 ` Waldemar Brodkorb
0 siblings, 1 reply; 3+ messages in thread
From: Romain Naour via buildroot @ 2026-08-15 12:10 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour, Thomas Petazzoni
On modern 32-bit architectures like RISC-V (riscv32), legacy 32-bit
time syscalls like __NR_gettimeofday are intentionally omitted because
RV32 implements a strict time64-only ABI to avoid the Year 2038 bug.
But uclibc-ng code [1] is using a direct __NR_gettimeofday syscall that
is not defined for riscv32.
[1] https://github.com/wbx-github/uclibc-ng/blob/ae4a98f9612c7050b1bceb9c8340fe5ef9345e22/ldso/include/dl-syscall.h#L263
As a workaround, we have to disable the SSP support for uclibc-ng
toolchain on riscv32 for now.
Fixes:
https://autobuild.buildroot.org/results/1b6/1b6f2161b11390b6545bddbc39b444401c718ebb/build-end.log
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
package/uclibc/Config.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 6b8b0d86f8..dfb74da789 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -100,6 +100,9 @@ config BR2_PTHREAD_DEBUG
config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
bool "Enable stack protection support"
+ # uClibc-ng ssp support requires __NR_gettimeofday defined.
+ # https://github.com/wbx-github/uclibc-ng/issues/19
+ depends on !BR2_RISCV_32
depends on BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
select BR2_TOOLCHAIN_HAS_SSP
help
--
2.55.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: disable SSP support for riscv32
2026-08-15 12:10 [Buildroot] [PATCH] package/uclibc: disable SSP support for riscv32 Romain Naour via buildroot
@ 2026-08-15 19:21 ` Waldemar Brodkorb
2026-08-15 20:25 ` Romain Naour via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Waldemar Brodkorb @ 2026-08-15 19:21 UTC (permalink / raw)
To: Romain Naour; +Cc: Thomas Petazzoni, buildroot
Hi Romain,
Romain Naour wrote,
> On modern 32-bit architectures like RISC-V (riscv32), legacy 32-bit
> time syscalls like __NR_gettimeofday are intentionally omitted because
> RV32 implements a strict time64-only ABI to avoid the Year 2038 bug.
>
> But uclibc-ng code [1] is using a direct __NR_gettimeofday syscall that
> is not defined for riscv32.
>
> [1] https://github.com/wbx-github/uclibc-ng/blob/ae4a98f9612c7050b1bceb9c8340fe5ef9345e22/ldso/include/dl-syscall.h#L263
>
> As a workaround, we have to disable the SSP support for uclibc-ng
> toolchain on riscv32 for now.
Thanks for your patch.
I would rather like to fix it inside uClibc-ng like suggested here:
https://lists.buildroot.org/pipermail/buildroot/2026-August/807581.html
https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thread/WIKMWPXJYAPTVVZ2MMZINUJNPIJXBMOE/
best regards
Waldemar
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: disable SSP support for riscv32
2026-08-15 19:21 ` Waldemar Brodkorb
@ 2026-08-15 20:25 ` Romain Naour via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Romain Naour via buildroot @ 2026-08-15 20:25 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: buildroot, Thomas Petazzoni
Hello Waldemar, All,
Le 15/08/2026 à 21:21, Waldemar Brodkorb a écrit :
> Hi Romain,
> Romain Naour wrote,
>
>> On modern 32-bit architectures like RISC-V (riscv32), legacy 32-bit
>> time syscalls like __NR_gettimeofday are intentionally omitted because
>> RV32 implements a strict time64-only ABI to avoid the Year 2038 bug.
>>
>> But uclibc-ng code [1] is using a direct __NR_gettimeofday syscall that
>> is not defined for riscv32.
>>
>> [1] https://github.com/wbx-github/uclibc-ng/blob/ae4a98f9612c7050b1bceb9c8340fe5ef9345e22/ldso/include/dl-syscall.h#L263
>>
>> As a workaround, we have to disable the SSP support for uclibc-ng
>> toolchain on riscv32 for now.
>
> Thanks for your patch.
>
> I would rather like to fix it inside uClibc-ng like suggested here:
> https://lists.buildroot.org/pipermail/buildroot/2026-August/807581.html
> https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thread/WIKMWPXJYAPTVVZ2MMZINUJNPIJXBMOE/
Sure, thanks for fixing the issue so fast!
Best regards,
Romain
>
> best regards
> Waldemar
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-15 20:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15 12:10 [Buildroot] [PATCH] package/uclibc: disable SSP support for riscv32 Romain Naour via buildroot
2026-08-15 19:21 ` Waldemar Brodkorb
2026-08-15 20:25 ` Romain Naour via buildroot
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.