Lines 630-638
tc-is-clang() {
Link Here
|
630 |
# Internal func. The first argument is the version info to expand. |
630 |
# Internal func. The first argument is the version info to expand. |
631 |
# Query the preprocessor to improve compatibility across different |
631 |
# Query the preprocessor to improve compatibility across different |
632 |
# compilers rather than maintaining a --version flag matrix. #335943 |
632 |
# compilers rather than maintaining a --version flag matrix. #335943 |
|
|
633 |
# FIXME: should this always call gcc expliticly, or should it show the gcc version that clang |
634 |
# pretends to be if the system compiler is clang |
633 |
_gcc_fullversion() { |
635 |
_gcc_fullversion() { |
634 |
local ver="$1"; shift |
636 |
local ver="$1"; shift |
635 |
set -- $($(tc-getCPP "$@") -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__") |
637 |
set -- $(gcc "$@" -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__") |
636 |
eval echo "$ver" |
638 |
eval echo "$ver" |
637 |
} |
639 |
} |
638 |
|
640 |
|
Lines 665-671
gcc-micro-version() {
Link Here
|
665 |
# Internal func. Based on _gcc_fullversion() above. |
667 |
# Internal func. Based on _gcc_fullversion() above. |
666 |
_clang_fullversion() { |
668 |
_clang_fullversion() { |
667 |
local ver="$1"; shift |
669 |
local ver="$1"; shift |
668 |
set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__") |
670 |
set -- $(clang "$@" -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__") |
669 |
eval echo "$ver" |
671 |
eval echo "$ver" |
670 |
} |
672 |
} |
671 |
|
673 |
|
672 |
- |
|
|