mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Don't use dynamic linking for libdivecomputer
Commit bd8948386d
("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>
This commit is contained in:
parent
3fbc2de085
commit
f2c61aefa7
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue