diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-14 16:06:13 +1200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-14 16:06:13 +1200 |
commit | f2c61aefa762ce2ef7dea61886afeb23b0fe5eff (patch) | |
tree | 92b0b4f471683d6cfcecf0e6244919adf3115cc6 /Makefile | |
parent | 3fbc2de085bda1b5bbeefcfe3053e0b0d37aa1e0 (diff) | |
download | subsurface-f2c61aefa762ce2ef7dea61886afeb23b0fe5eff.tar.gz |
Don't use dynamic linking for libdivecomputer
Commit bd8948386d55 ("Since we don't want configure, use gnumake to find
libdivecomputer") was totally broken. Sure, using GNU make features is
fine. But then hiding in that commit is the fact that it also changed
it to use "-ldivecomputer" instead of just linking with the static
libdivecomputer archive.
And that's just a really bad idea. Dynamic linking is useful for things
like libc, where it allows sharing of the code pages across all the
programs using it. For something like libdivecomputer it's just a *bad*
idea, and doesn't even work. The libdivecomputer interfaces aren't
stable enough to make it a good idea even if it *did* work, and the
libdivecomputer "make install" phase doesn't do the proper ldconfig etc
setup anyway.
Static linking is just simpler and better. It also means that the
binary will work even if you move it around to another machine - since
libdivecomputer isn't exactly a "standard library"..
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -30,11 +30,11 @@ libdc-usr := $(wildcard /usr/include/libdivecomputer/*) ifneq ($(strip $(libdc-local)),) LIBDIVECOMPUTERDIR = /usr/local LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer - LIBDIVECOMPUTERARCHIVE = -L$(LIBDIVECOMPUTERDIR)/lib -ldivecomputer + LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a else ifneq ($(strip $(libdc-usr)),) LIBDIVECOMPUTERDIR = /usr LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer - LIBDIVECOMPUTERARCHIVE = -ldivecomputer + LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a else $(error Cannot find libdivecomputer - please edit Makefile) endif |