forked from iortcw/iortcw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Link game, cgame, ui modules to $(LIBS)
All three modules call mathematical functions like atan2(). On glibc systems, when compiled to native code with an ordinary C compiler (as opposed to bytecode from q3lcc), they get the definition of those functions from libm. Until now, they were not explicitly linked to libm, and instead relied on the fact that libm is linked into the main executable. However, doing it this way defeats glibc's symbol-versioning mechanisms, and can fail in some situations, in particular binaries built with -ffast-math on a pre-2.31 version of glibc (where atan2() resolves to __atan2_finite()), and used without recompilation on a post-2.31 version of glibc (where __atan2_finite() has become a deprecated hidden symbol that is only available as a versioned symbol). When building shared libraries and loadable modules, it's most robust to link them explicitly to their dependencies, as is done here. $(LIBS) also includes -ldl, which is unnecessary but harmless. Based on ioquake3 pull request <ioquake/ioq3#461>. Bug-Debian: https://bugs.debian.org/966150 Bug-Debian: https://bugs.debian.org/966173
- Loading branch information
Showing
2 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters