From: "Michael R. Crusoe" <crusoe@debian.org>
Date: Mon, 9 Sep 2019 10:23:45 +0900
Subject: For Debian, don't statically link to cairo, jansson, libstdc++,
 libgcc

Forwarded: not-needed
Assisted-By: scaleway/deepseek-v4-flash-0731
---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,7 @@ LD_CAIRO_LIB_FLAGS = $(shell PKG_CONFIG_
 # By default it has no suffix
 BOOST_SUFFIX=""
 # We define some more libraries to link against at the end, in static linking mode if possible, so we can use faster non-PIC code. These have both .so/.dylib and .a versions available.
-LD_STATIC_LIB_FLAGS := -lvgio -lhts -ldeflate -lz -lbz2 -llzma
+LD_STATIC_LIB_FLAGS := -lvgio -lhts -ldeflate -lz -llzma
 # Some of our static libraries depend on libraries that may not always be avilable in static form.
 LD_STATIC_LIB_DEPS := -lpthread -lm
 # Use pkg-config to find dependencies.
@@ -333,7 +333,7 @@ endif
 LD_LIB_FLAGS += "-lboost_program_options$(BOOST_SUFFIX)"
 
 # These libs need to come after libdw if used, because libdw depends on them
-LD_LIB_FLAGS += -ldl -llzma -lbz2 -lzstd
+LD_LIB_FLAGS += -ldl -llzma -lzstd
 
 # Sometimes we need to filter the assembler output. The assembler can run during
 # ./configure scripts, compiler calls, or $(MAKE) calls (other than $(MAKE)
@@ -360,7 +360,7 @@ else
     AUTOMAKE_MAKEFLAGS=
 endif
 
-STATIC_FLAGS=-static -static-libstdc++ -static-libgcc
+STATIC_FLAGS=-static
 
 SRC = $(wildcard $(SRC_DIR)/*.cpp)
 ALGORITHMS_SRC = $(wildcard $(ALGORITHMS_SRC_DIR)/*.cpp)
