Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) # gcc-version gcc-command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) # Print the gcc version of `gcc-command' in a 5 or 6-digit form
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) # such as `29503' for gcc-2.95.3, `30301' for gcc-3.3.1, etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) compiler="$*"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) if [ ${#compiler} -eq 0 ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 	echo "Error: No compiler specified." >&2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 	printf "Usage:\n\t$0 <gcc-command>\n" >&2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	exit 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL