Fix docker runtime compilers versions metadata

This commit is contained in:
Samuel Aubertin
2022-04-12 11:53:17 +02:00
parent 202bc29099
commit 073f49dc71
2 changed files with 13 additions and 7 deletions

View File

@@ -69,8 +69,8 @@ endif
CPU:= $(shell LC_ALL=en_US.UTF-8 lscpu | grep "Model name" | cut -d":" -f 2 | sort | uniq | awk '{$$1=$$1;print}')
UCODE:= $(shell (grep microcode /proc/cpuinfo 2> /dev/null || printf unknown) | sort | uniq | awk '{print $$NF}' || printf unknown)
KERN:= $(shell uname -svm)
CLANGV:= $(shell (clang -v 2>&1 | head -n 1)) || apk info -a clang | head -n1 | awk '{print $$1}' || printf unknown)
GCCV:= $(shell (gcc -v 2>&1 | grep 'gcc version') || apk info -a gcc | head -n1 | awk '{print $$1}' || printf unknown)
CLANGV:= $(shell (clang -v 2>&1 | head -n 1)) || (apk info -a clang 2> /dev/null | head -n1 | awk '{print $$1}') || printf unknown)
GCCV:= $(shell (gcc -v 2>&1 | grep 'gcc version') || (apk info -a gcc 2> /dev/null | head -n1 | awk '{print $$1}') || printf unknown)
VULN1:= $(shell (cat /sys/devices/system/cpu/vulnerabilities/spectre_v1 2> /dev/null || printf unknown))
VULN2:= $(shell (cat /sys/devices/system/cpu/vulnerabilities/spectre_v2 2> /dev/null || printf unknown))
REVISION:= $(shell git rev-parse --short HEAD)