3 # Probe the compiler for vintage, version, etc. This is used for setting
4 # optional make knobs under the DEVELOPER knob.
8 # we get something like (this is at least true for gcc and clang)
10 # FreeBSD clang version 3.4.1 (tags/RELEASE...)
12 LANG
=C LC_ALL
=C
$CC -v 2>&1 |
grep ' version '
16 get_version_line |
sed 's/^\(.*\) version [0-9].*/\1/'
20 # A string that begins with a digit up to the next SP
21 ver
=$
(get_version_line |
sed 's/^.* version \([0-9][^ ]*\).*/\1/')
23 # There are known -variant suffixes that do not affect the
24 # meaning of the main version number. Strip them.
33 version
=$
(get_version | cut
-f 1 -d .
)
35 # Print a feature flag not only for the current version, but also
36 # for any prior versions we encompass. This avoids needing to do
37 # numeric comparisons in make, which are awkward.
38 while test "$version" -gt 0
41 version
=$
((version
- 1))
45 case "$(get_family)" in
56 : unknown compiler family