1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Description: Correctly link the binary with -pthread, to include -latomic when needed.
Author: Aurelien Jarno <aurel32@debian.org>
Last-Update: 2021-12-11
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,9 @@
CXX ?= g++
CXXFLAGS += -std=c++11 -pthread -g -O3 -I${DIR_INC} $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
-LIBS := -lisal -ldeflate -lpthread
+LIBS := -lisal -ldeflate
STATIC_FLAGS := -static -Wl,--no-as-needed -pthread
-LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(LIBS)
+LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(LIBS) -pthread
STATIC_LD_FLAGS := $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(STATIC_FLAGS) $(LIBS) $(STATIC_LD_FLAGS)
|