summaryrefslogtreecommitdiff
path: root/scripts/clang-version.sh
AgeCommit message (Collapse)Author
2019-03-04kbuild: update comment block of scripts/clang-version.shMasahiro Yamada
Commit 469cb7376c06 ("kconfig: add CC_IS_CLANG and CLANG_VERSION") changed the code, but missed to update the comment block. The -p option was gone, and the output is 5-digit (or 6-digit when Clang 10 is released). Update the comment now. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-08-22kbuild: Add a space after `!` to prevent parsing as file patternMichael Forney
Some shells use !(pattern|...|pattern) to match file names not containing the specified patterns. This may result in output like $ ./scripts/clang-version.sh gcc ./scripts/clang-version.sh[18]: COPYING: not found printf: %d __clang_major__: conversion error printf: %d __clang_minor__: conversion error printf: %d __clang_patchlevel__: conversion error 00000 $ and set CONFIG_CLANG_VERSION to the invalid value '00000'. POSIX says[0] If the pipeline begins with the reserved word ! and command1 is a subshell command, the application shall ensure that the ( operator at the beginning of command1 is separated from the ! by one or more <blank> characters. The behavior of the reserved word ! immediately followed by the ( operator is unspecified. So, just add a <blank> to prevent this. [0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_02 Signed-off-by: Michael Forney <mforney@mforney.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-08kconfig: add CC_IS_CLANG and CLANG_VERSIONMasahiro Yamada
This will be useful to describe the clang version dependency. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Kees Cook <keescook@chromium.org>
2018-03-26kbuild: add clang-version.shSami Tolvanen
Based on gcc-version.sh, clang-version.sh prints out the correct version of clang. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>