Source: gcc-12
Version: 12.2.0-1
Severity: important
X-Debbugs-Cc: debian-ri...@lists.debian.org

Dear gcc Maintainer,

Since glibc 2.34 we need to link libatomic explicitly to fix
huge amount issues that has ftbfs on riscv64.

The detailed explanation is here[0]:

```
... linking with -pthread automatically links with libatomic,
however the recent upload of glibc 2.34 made the -pthread flag 
not fully necessary anymore, and cmake decided to stop using it. 
The workaround is to explicitly link with libatomic
```
We have sent numerous patches to fix this issue[1]. But it is
obvious that, in the past, using the pthread flag in cmake to 
link libatomic, there will be trouble after rebuild like [2].

The workground is *stolen* from Arch linux gcc patch:
https://github.com/felixonmars/archriscv-packages/blob/master/gcc/riscv64.patch#L65

So can we try it? I am not gcc expert and unable to evaluate
the workround how trouble if enabled in Debian. Or there are 
other better solutions? 

Welcome Comments here.

Please feel free to change severity if it is inappropriate.


[0]: https://lists.debian.org/debian-riscv/2022/08/msg00028.html
[1]: 
https://udd.debian.org/cgi-bin/bts-usertags.cgi?user=debian-riscv%40lists.debian.org&tag=riscv64
[2]: 
https://buildd.debian.org/status/fetch.php?pkg=opentracing-cpp&arch=riscv64&ver=1.6.0-3&stamp=1661892134&raw=0
-- 
Regards,
--
  Bo YU

Attachment: signature.asc
Description: PGP signature

Reply via email to