There is a note stating that old ld.bfd did not support ELF_COMDAT, and as such it was made Linux-only.
This no longer needs to be the case. LLVM lld has been an option on FreeBSD since 2016 and is the default linker since FreeBSD 13, released in 2021. OpenBSD made lld the default linker in OpenBSD 6.5, released in 2019.
I think it is time to add these two OSes to the ELF_COMDAT list.
dlang/dmd pull request #16576 "Fix 24597 -- FreeBSD/OpenBSD: Enable ELF_COMDAT" was merged into stable:
- 6b96552919e0ac7e80b18e8ce8d5ed1f7f779ae1 by Brian Callahan:
Fix Bugzilla 24597
https://github.com/dlang/dmd/pull/16576
Comment #3 by dlang-bot — 2024-06-16T07:36:56Z
dlang/dmd pull request #16589 "merge stable" was merged into master:
- aa5f1b4a6014a52c7118dde37274f8d336dc2ec0 by Brian Callahan:
Fix Bugzilla 24597
https://github.com/dlang/dmd/pull/16589