aboutsummaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
scarthgappython3-os-brick: Fix syntax errorZoltán Böszörményi6 days
masterpython3-os-brick: Fix syntax errorZoltán Böszörményi6 days
nanbieldiproute2: upgrade bbappend to 6.%Alex Stewart3 months
kirkstonepython3-ansible: Add locale-base-en-us to RDEPENDSNarpat Mali6 months
mickledorefuse: Fix CVE-2023-26253Soumya13 months
master-nextglobal: add explicit branch to all SRC_URIsBruce Ashfield2 years
hardknottpython3-posix-ipc: Add LDSHARED to recipeTrevor Gamblin2 years
honistersalt: use $BPN in SRC_URIAlex Stewart3 years
gatesgarthpython3-osprofiler: upgrade 2.9.0 -> 3.4.0zhengruoqin3 years
dunfellpython3-distro: include as RDEPEND for salt-masterBen Gampe4 years
warriorpython-automaton: satisfy setup.py setup_requiresBabak Sarashki4 years
zeuslayer.conf: Update PREFERRED_VERSIONzhengruoqin4 years
thudpostgresql: Fix issue where init script is not found.Jeremy Puhlman5 years
rockotgt: Use return instead of exit to restart tgtd, if tgtd is not runningJagadeesh Krishnanjanappa6 years
sumotgt: Use return instead of exit to restart tgtd, if tgtd is not runningJagadeesh Krishnanjanappa6 years
pyroglusterfs: Move from meta-openstack to meta-cloud-servicesHe Zhe7 years
mortyidentity.bbclass: Fix python synthax errorAdrian Dudau8 years
fido-kilopython-taskflow: upgrade to 0.7.1 (kilo)Josep Puigdemont8 years
dizzy-junopython-django-appconf: use correct hashesJosep Puigdemont9 years
junopython-django-appconf: use correct hashesJosep Puigdemont9 years
kilospice: add SRCREV_FORMAT to recipeJoe Slater9 years
havanahousekeeping: Add a non-numeric PR prefix to allow PRINC in bbappendsMark Asselstine10 years
icehousehousekeeping: Add a non-numeric PR prefix to allow PRINC in bbappendsMark Asselstine10 years
grizzlypython-horizon: remove nodejs from RDEPENDS of powerpc archZhenhua Luo10 years
 
sdk-5.15/nxp-s32g'>v5.15/standard/nxp-sdk-5.15/nxp-s32g Yocto Linux Embedded kernelGrokmirror user
summaryrefslogtreecommitdiffstats
path: root/scripts/gcc-version.sh
blob: ae353432539bf5a58bf24c21ea6c3b20b460c501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# gcc-version gcc-command
#
# Print the gcc version of `gcc-command' in a 5 or 6-digit form
# such as `29503' for gcc-2.95.3, `30301' for gcc-3.3.1, etc.

compiler="$*"

if [ ${#compiler} -eq 0 ]; then
	echo "Error: No compiler specified." >&2
	printf "Usage:\n\t$0 <gcc-command>\n" >&2
	exit 1
fi

MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL