Revision 28a17338738839494752c5da3e12c889a55219db authored by Linus Torvalds on 14 February 2021, 19:50:31 UTC, committed by Linus Torvalds on 14 February 2021, 19:50:31 UTC
Pull LED fix from Pavel Machek:
 "One-liner fixing a build problem"

* 'for-rc8-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
  leds: rt8515: add V4L2_FLASH_LED_CLASS dependency
2 parent s ab30c7f + dbeb02a
Raw File
clang-version.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# clang-version clang-command
#
# Print the compiler version of `clang-command' in a 5 or 6-digit form
# such as `50001' for clang-5.0.1 etc.

compiler="$*"

if ! ( $compiler --version | grep -q clang) ; then
	echo 0
	exit 1
fi

MAJOR=$(echo __clang_major__ | $compiler -E -x c - | tail -n 1)
MINOR=$(echo __clang_minor__ | $compiler -E -x c - | tail -n 1)
PATCHLEVEL=$(echo __clang_patchlevel__ | $compiler -E -x c - | tail -n 1)
printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
back to top