Summary: | >=net-libs/nodejs-20 produces unstable binary with >=sys-devel/gcc-13 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Amit Prakash Ambasta <amit.prakash.ambasta> |
Component: | Current packages | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jy6x2b32pie9, toolchain |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: |
https://github.com/nodejs/node/issues/47865 https://bugs.gentoo.org/show_bug.cgi?id=909394 https://bugs.gentoo.org/show_bug.cgi?id=843926 |
||
Whiteboard: | Workaround: fno-ipa-icf | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 865117, 915000 | ||
Attachments: | Patch to resolve the issue |
Description
Amit Prakash Ambasta
2023-05-16 05:05:49 UTC
Created attachment 861781 [details, diff]
Patch to resolve the issue
The patch applies the fix recommended at the upstream issue, and generates a stable binary.
Thanks. What CFLAGS + CXXFLAGS + LDFLAGS did you use to compile nodejs? The upstream report says -O2 is enough for them for the miscompilation to occur. Was it for you? Per emerge --info, the C(XX)FLAGS are CFLAGS="-march=native -pipe -fno-stack-protector -O3 -fuse-ld=mold" CXXFLAGS="-march=native -pipe -fno-stack-protector -O3 -fuse-ld=mold" The flags have not been overwritten in env or otherwise. Have triggered a O2 rebuild to see if the issue persists O2 rebuild seems fine. I think the issue only occurs with O3 Issue has been resolved in subsequent releases of NodeJS in upstream. Sorry, I thought this was resolved (and missed that my patches for fno-ipa-icf) were actually being applied! Build net-libs/nodejs-20.11.1 with sys-devel/mold-2.30.0 and sys-devel/gcc-13.2.1_p20240210 CXXFLAGS="-march=native -pipe -fno-stack-protector -O3 -fuse-ld=mold" CFLAGS="-march=native -pipe -fno-stack-protector -O3 -fuse-ld=mold" LDFLAGS="-fuse-ld=mold -Wl,-O1 -Wl,--as-needed" I can not reproduce the problem. It appears to be fixed upstream quietly. Closing since this is fixed upstream. |