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
Makefile.m32: major rework [ci skip] #9632
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch replaces `CURL_*` envvars [1][2] with more familiar ones, which are also used in autotools and other build tools and which have been in fact used internally by `Makefile.m32` scripts. `CURL_CC` is now `CC`, `CURL_RANLIB` -> `RANLIB`, `CURL_RC` -> `RC`, `CURL_STRIP` -> `STRIP`, `CURL_AR` -> `AR`. This aims to make configuration more straighforward. Also fix some indentation and delete `AR` assigments from src and examples, where the value wasn't used. [1] 1d5b7b7 [2] 4440b6a Closes #xxxx
No assigmnents seem to need this.
It was necessary while libcurl was unconditionally built with debug info. This flag has been deleted earlier, so strip is no longer necessary. Follow-up from 16a58e9
At least not in the last 10 years.
Existing logic assumed the embedded layout (when c-ares was part of curl) that is long gone.
This made sense when it was part of curl, but no longer.
Do you know of the reason curl_LDADD was used instead of LDFLAGS? It seems like that was an intentional choice but I don't know what advantage it would have. |
for curl.exe, ZLIB flags are necessary for hugehelp compression. Oddly enough, USE_NGTCP2 is used inside lib/dynbuf.c, which is compiled into curl.exe directly. This has been fixed in 7.86.0 [0] so let's drop this constant. [0] f703cf9
Override with `NGTCP2_LIBS`. This changes one error with another if mis-configured, while making the script shorter and simpler.
…ckend Things go complex quickly when introducing built-in support for mbedtls or wolfssl (also for the CURL_WITH_MULTI_SSL setting), but for SSL vs SCHANNEL only, the logic can remain simple. To scale better, probably Makefile.m32 should not be overly clever here, but instead expect the caller to explicitly set all necessary components.
This can cause problems when we want to build with a TLS-backend that has no built-in support in Makefile.m32, e.g. SSH2 + wolfssl and without Schannel. After this patch, the CFG must contain any necessary TLS backend explicitly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch overhauls
Makefile.m32
scripts, fixing a list of quirks, making its behaviour and customization envvars align better with other build systems, aiming for less code, that is easier to read, use and maintain.Details:
CURL_CC
->CC
CURL_RC
->RC
CURL_AR
->AR
CURL_LDFLAG_EXTRAS_DLL
->CURL_LDFLAGS_LIB
CURL_LDFLAG_EXTRAS_EXE
->CURL_LDFLAGS_BIN
CURL_STRIP
andCURL_RANLIB
. These tools are no longer used.CFLAGS
,CPPFLAGS
,RCFLAGS
,LDFLAGS
andLIBS
envvars.CURL_CFLAG_EXTRAS
,CURL_LDFLAG_EXTRAS
,CURL_RCFLAG_EXTRAS
infavor of the above.
zlib
withlibssh2
.zlib
is optionalwith
libssh2
.CPPFLAGS
options when buildingcurl.exe
andexamples.
-winssl
CFG
option. Use-schannel
instead.
=
->:=
).CURL_DLL_A_SUFFIX
to override the implib suffix.Instead, use the standard naming scheme by default:
libcurl.dll.a
.The toolchain recognizes the name, and selects it automatically when
asking for a
-shared
vs.-static
build.strip
tolibcurl.a
. Follow-up from16a58e9. There was no debug info to
strip since then.
-O3
,-W
,-Wall
options. You can add these toCFLAGS
as desired.-DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
with OpenSSL,to avoid that vulnerability on Windows.
-lbrotlicommon
toLIBS
when usingbrotli
.-nghttp3
without-ngtcp2
.-ssh2
and-rtmp
options no longer try to auto-select a TLS-backend.You need to set the backend explicitly. This scales better and avoids
issues with certain combinations (e.g.
libssh2
+wolfssl
with noschannel
).ngtcp2
. Possible to override viaNGTCP2_LIBS
.SSH2=1
) no longersupported.
SPNEGO
references. They were no-ops.OPENSSL_LIBS
independently fromOPENSSL_LIBPATH
.libssh2
builds by default.CURL_DLL_SUFFIX
in-dyn
mode when buildingcurl.exe
andexamples.
LIBCARES_PATH
. (Instead of thelong gone embedded one.)
CPPFLAGS=-DCARES_STATICLIB
to enable it.between src/lib and example make files.
Closes #9632