Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[deps/curl]: sync build flags with Yggdrasil/LibCURL #45933

Merged
merged 4 commits into from
Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions deps/curl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ $(SRCCACHE)/curl-$(CURL_VER)/source-extracted: $(SRCCACHE)/curl-$(CURL_VER).tar.
checksum-curl: $(SRCCACHE)/curl-$(CURL_VER).tar.bz2
$(JLCHECKSUM) $<

## xref: https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/LibCURL/common.jl
# Disable....almost everything
CURL_CONFIGURE_FLAGS := $(CONFIGURE_COMMON) \
--without-ssl --without-gnutls --without-libidn2 --without-librtmp \
--without-nss --without-libpsl --without-libgsasl --without-fish-functions-dir \
--disable-ares --disable-manual --disable-ldap --disable-ldaps --disable-static
# A few things we actually enable
CURL_CONFIGURE_FLAGS += --enable-versioned-symbols \
--with-libssh2=${build_prefix} --with-zlib=${build_prefix} --with-nghttp2=${build_prefix}
CURL_CONFIGURE_FLAGS += --without-gssapi

# We use different TLS libraries on different platforms.
# On Windows, we use schannel
# On MacOS, we use SecureTransport
Expand All @@ -44,21 +55,17 @@ CURL_TLS_CONFIGURE_FLAGS := --with-secure-transport
else
CURL_TLS_CONFIGURE_FLAGS := --with-mbedtls=$(build_prefix)
endif
CURL_CONFIGURE_FLAGS += $(CURL_TLS_CONFIGURE_FLAGS)

$(BUILDDIR)/curl-$(CURL_VER)/build-configured: $(SRCCACHE)/curl-$(CURL_VER)/source-extracted
mkdir -p $(dir $@)
cd $(dir $@) && \
$(dir $<)/configure $(CONFIGURE_COMMON) --includedir=$(build_includedir) \
--without-ssl --without-gnutls --without-gssapi --disable-ares \
--without-libidn2 --without-librtmp --without-nss --without-libpsl \
--disable-ldap --disable-ldaps --without-zsh-functions-dir --disable-static \
--with-libssh2=$(build_prefix) --with-zlib=$(build_prefix) --with-nghttp2=$(build_prefix) \
$(CURL_TLS_CONFIGURE_FLAGS) \
$(dir $<)/configure $(CURL_CONFIGURE_FLAGS) \
CFLAGS="$(CFLAGS) $(CURL_CFLAGS)" LDFLAGS="$(LDFLAGS) $(CURL_LDFLAGS)"
echo 1 > $@

$(BUILDDIR)/curl-$(CURL_VER)/build-compiled: $(BUILDDIR)/curl-$(CURL_VER)/build-configured
$(MAKE) -C $(dir $<) $(LIBTOOL_CCLD)
$(MAKE) -C $(dir $<) $(MAKE_COMMON)
echo 1 > $@

$(BUILDDIR)/curl-$(CURL_VER)/build-checked: $(BUILDDIR)/curl-$(CURL_VER)/build-compiled
Expand All @@ -69,7 +76,7 @@ endif

$(eval $(call staged-install, \
curl,curl-$$(CURL_VER), \
MAKE_INSTALL,$$(LIBTOOL_CCLD),, \
MAKE_INSTALL,,, \
$$(INSTALL_NAME_CMD)libcurl.$$(SHLIB_EXT) $$(build_shlibdir)/libcurl.$$(SHLIB_EXT)))

clean-curl:
Expand Down