autotools: fix/improve gcc and Apple clang version detection #12362
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.
Before this patch we expected
n.n
-dumpversion
output, but Ubuntumay return
n-win32
(also with-dumpfullversion
). Causing theseerrors and failing to enable picky warnings:
Ref: https://github.com/libssh2/libssh2/actions/runs/6263453828/job/17007893718#step:5:143
Fix that by stripping any dash-suffix and handling a dotless (major-only)
version number by assuming
.0
in that case.9.3-posix
,9.3-win32
,6
,9.3.0
,11
,11.2
,11.2.0
Ref: fix version detection in str_to_version for versions formatted as (n).(n)-suffix mamedev/mame#9767
fix Apple clang version detection for releases between
'Apple LLVM version 7.3.0' and 'Apple LLVM version 10.0.1' where the
version was under-detected as 3.7 llvm/clang equivalent.
fix Apple clang version detection for 'Apple clang version 11.0.0'
and newer where the Apple clang version was detected, instead of its
llvm/clang equivalent.
display detected clang/gcc/icc compiler version.
Via libssh2:
autotools: fix selecting wincng in cross-builds libssh2/libssh2#1187
autotools: fix dotless gcc and Apple clang version detections libssh2/libssh2#1232
Closes #12362