Skip to content

Fix atexit() linking error

Peter Lunden requested to merge loppanloppis/sbbs:master into master

Recent versions of glibc expose atexit() as a hidden symbol in libc_nonshared.a, causing linking failures when building OpenDoors as a shared library.

This fix switches from using $(LD) directly to $(CC) (gcc) to invoke the linker, and adds -Wl,-Bsymbolic to force internal resolution of symbols, resolving the "hidden symbol atexit ... is referenced by DSO" error.

Also adds -lc explicitly to ensure glibc is linked properly.

Tested on Debian 12 and Ubuntu 24.04.

Merge request reports

Loading