GNU D compiler has been broken on FreeBSD 14 for over a year and no one noticed
10 days ago
- #FreeBSD
- #D programming
- #compiler
- D programming language offers three compilers: DMD, GDC, and LDC, differing mainly in their backends.
- FreeBSD lacks a GDC package, prompting an attempt to build it, revealing compatibility issues with GNU as on FreeBSD 14.
- GDC requires a D compiler to build itself, leading to a bootstrap challenge solved by using GCC 11.5.0.
- FreeBSD 14's changes to qsort_r(3) compatibility caused assembly errors with GNU as, but Clang assembles correctly.
- A workaround using Clang as the assembler was attempted but failed due to incorrect section flags in GCC's output.
- The issue highlights the importance of package maintainership for catching compatibility problems early.
- Solutions proposed include fixing qsort_r(3) compatibility or adjusting GCC's output for .eh_frame and .debug_str sections.