Fix the configuration of ZSTD on mingw-w64#12265
Merged
shindere merged 5 commits intoocaml:trunkfrom May 30, 2023
Merged
Conversation
This was needed for caml_print_trace in multicore, but this function was removed prior to merging. The functions in execinfo.h are used in the tests for frame pointers, but this is Linux-only and the functions are implemented in glibc.
$mathlib is unconditionally set later in configure.ac
On mingw-w64, libm.a is a dummy library. The existing link test would pass, but pointlessly add -lm to the linking list. Use AC_SEARCH_LIBS instead, so that -lm is only added when strictly needed.
The same libraries are used for each. Distinction kept in Makefile.config as it's both public and could be overridden in the build system if needed.
Remove all the special-case code for the Windows ports. Means that the zstd configuration is now correctly propagated.
Contributor
|
I reviewed this twice: once before it became a PR and once right now.
Each commit looks good and is clearly explained. ThisPR is nice because
it both simplifies the code and makes it work better. And it has been
checked in Precheck.
Thus, approving and merging.
|
shindere
approved these changes
May 30, 2023
Member
Author
|
Thanks, @shindere! |
Member
|
@Octachron this change is placed in the 5.1 section in the trunk branch, but was never backported to 5.1. Should we consider backporting it to 5.1? For reference, the Changes entry: This is a |
Octachron
pushed a commit
that referenced
this pull request
Jun 14, 2023
Fix the configuration of ZSTD on mingw-w64 (cherry picked from commit 224c14c)
Member
|
Cherry-picked on 5.1 as 1d7bfeb and I have checked that this was the only forgotten PRs in the 5.1 milestone. |
This file contains hidden or 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
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.
#12190 means that the mingw-w64 version of ZSTD is correctly detected by
configure.acandHAS_ZSTDis correctly defined ins.h. However, the way thatbytecclibsandnativecclibsare declared for the Windows ports means that-lzstddoes not get added and consequently the build fails with a linking error.This PR ultimately unifies the computation of
cclibsbetween Unix and Windows, a side-effect of which is that ZSTD now configures correctly. The PR is best reviewed commit-by-commit. There's no distinction inconfigure.acbetween bytecode and nativecode libraries, so the variables have been merged tocclibsto remove the code duplication.The important check here is the diff in
config.statusbefore and after the PR. There's no relevant change on Unix. On Windows, the only pertinent change is that-latomicgets added for 32-bit mingw-w64 (as for the other 32-bit GCC ports).