Skip to content

Commit

Permalink
libcurl.dll: link zstd statically
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Aug 22, 2020
1 parent 0664677 commit d9b266a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _dl.sh
Expand Up @@ -30,7 +30,7 @@ export OSSLSIGNCODE_HASH=f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d
# NOTE: Set _REV to empty after bumping CURL_VER_, and
# set it to 1 then increment by 1 each time bumping a dependency
# version or pushing a CI rebuild for the master branch.
export _REV='1'
export _REV='2'

[ -z "${_REV}" ] || _REV="_${_REV}"

Expand Down
36 changes: 36 additions & 0 deletions curl.patch
@@ -0,0 +1,36 @@
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 02b31106c6e..37887eed5dd 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -298,7 +298,12 @@ endif
ifdef ZSTD
INCLUDES += -I"$(ZSTD_PATH)/include"
CFLAGS += -DHAVE_ZSTD
- DLL_LIBS += -L"$(ZSTD_PATH)/lib" -lzstd
+ DLL_LIBS += -L"$(ZSTD_PATH)/lib"
+ ifdef ZSTD_LIBS
+ DLL_LIBS += $(ZSTD_LIBS)
+ else
+ DLL_LIBS += -lzstd
+ endif
endif
ifdef BROTLI
INCLUDES += -I"$(BROTLI_PATH)/include"
diff --git a/src/Makefile.m32 b/src/Makefile.m32
index afb4fd547bd..74e7b93d7ae 100644
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@ -312,7 +312,12 @@ endif
ifdef ZSTD
INCLUDES += -I"$(ZSTD_PATH)/include"
CFLAGS += -DHAVE_ZSTD
- curl_LDADD += -L"$(ZSTD_PATH)/lib" -lzstd
+ curl_LDADD += -L"$(ZSTD_PATH)/lib"
+ ifdef ZSTD_LIBS
+ curl_LDADD += $(ZSTD_LIBS)
+ else
+ curl_LDADD += -lzstd
+ endif
endif
ifdef BROTLI
INCLUDES += -I"$(BROTLI_PATH)/include"
36 changes: 36 additions & 0 deletions curl.test.patch
@@ -0,0 +1,36 @@
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 02b31106c6e..37887eed5dd 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -298,7 +298,12 @@ endif
ifdef ZSTD
INCLUDES += -I"$(ZSTD_PATH)/include"
CFLAGS += -DHAVE_ZSTD
- DLL_LIBS += -L"$(ZSTD_PATH)/lib" -lzstd
+ DLL_LIBS += -L"$(ZSTD_PATH)/lib"
+ ifdef ZSTD_LIBS
+ DLL_LIBS += $(ZSTD_LIBS)
+ else
+ DLL_LIBS += -lzstd
+ endif
endif
ifdef BROTLI
INCLUDES += -I"$(BROTLI_PATH)/include"
diff --git a/src/Makefile.m32 b/src/Makefile.m32
index afb4fd547bd..74e7b93d7ae 100644
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@ -312,7 +312,12 @@ endif
ifdef ZSTD
INCLUDES += -I"$(ZSTD_PATH)/include"
CFLAGS += -DHAVE_ZSTD
- curl_LDADD += -L"$(ZSTD_PATH)/lib" -lzstd
+ curl_LDADD += -L"$(ZSTD_PATH)/lib"
+ ifdef ZSTD_LIBS
+ curl_LDADD += $(ZSTD_LIBS)
+ else
+ curl_LDADD += -lzstd
+ endif
endif
ifdef BROTLI
INCLUDES += -I"$(BROTLI_PATH)/include"

0 comments on commit d9b266a

Please sign in to comment.