NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-sparc/58352: ld: /usr/lib/libubsan.so: undefined reference to `__sync_val_compare_and_swap_8'
The following reply was made to PR port-sparc/58352; it has been noted by GNATS.
From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost, port-sparc-maintainer%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, campbell+netbsd%mumble.net@localhost
Cc:
Subject: Re: port-sparc/58352: ld: /usr/lib/libubsan.so: undefined reference
to `__sync_val_compare_and_swap_8'
Date: Thu, 20 Jun 2024 00:12:04 +0900
On 2024/06/19 23:55, Martin Husemann wrote:
> The following reply was made to PR port-sparc/58352; it has been noted by GNATS.
>
> From: Martin Husemann <martin%duskware.de@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc:
> Subject: Re: port-sparc/58352: ld: /usr/lib/libubsan.so: undefined reference
> to `__sync_val_compare_and_swap_8'
> Date: Wed, 19 Jun 2024 16:51:37 +0200
>
> On Wed, Jun 19, 2024 at 02:45:02PM +0000, Rin Okuyama wrote:
> > (3) Earliest CPU model satisfy (2) seems `ultrasparc3`, IIUC:
> > (I'm not familiar to sparc although...)
>
> All ultrasparc CPUs support VIS and can do 64bit atomic ops.
>
> The ultrasparc3 introduced "VIS 2" with additional instructions.
Hmm, I tried `-mcpu=ultrasparc`, but generated library has reference to
__sync_val_compare_and_swap_8. I've not figured out why, at the moment.
> However, for 32bit sparc CPUs we can not assume support (and it is pretty
> lame of ubsan to use it). Can we patch the ubsan code to only require 64bit
> atomics #ifdef _LP64 ?
Yeah, this is just what I tried. It works at least on i386, but
diff is *really* large:
https://gist.github.com/rokuyama/24d0ed7e537fffc07e2975c3880817f1
I wonder whether we can ship atomic64 runtime routines with
lib*san as, e.g., hidden symbols...
Thanks,
rin
Home |
Main Index |
Thread Index |
Old Index