Re: fossil build failure on riscv64
On Thu, Apr 10, 2025 at 3:46 AM Barak A. Pearlmutter
<barak@pearlmutter.net> wrote:
>
> When fossil 2.25-2 is compiled with clang, it works fine!
>
Great!
> $ debian/rules binary CC=clang CXX=clang++
> $ ./fossil version
> This is fossil version 2.25 [1fba3e4aa9] 2025-04-07 19:33:35 UTC
> $ ./fossil test-th-eval "expr (1<<31)"
> -2147483648
>
> So the issue is in GCC. I will hotwire debian/rules to use clang on
> riscv64, but it would probably make sense to alert the GCC
> maintainers. Not sure how to cobble together a minimal program that
> exhibits the problem though. We don't even know what's going on at the
> low level. And, it might not be a bug: the C/C++ specs may give the
> compiler license to burn down the house when it sees (1<<31) in a
> signed 32-bit integer.
Ack.
Or we can open one reportbug to trace the issue and allow other
developers to refer to this.
I am trying to debug this using gdb but I'm not sure if I can
construct a minimal test suite that reproduces this problem, but I'll
try it and let compiler expert take a look if necessary.
Thanks for your work on this!
BR,
Bo
Reply to: