From 073f49dc716be93f4bf0f49535604bb0a4e0a08f Mon Sep 17 00:00:00 2001 From: Samuel Aubertin Date: Tue, 12 Apr 2022 11:53:17 +0200 Subject: [PATCH] Fix docker runtime compilers versions metadata --- Makefile | 4 ++-- README.md | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e69a99c..1e1c316 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index 258f406..f4ea259 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,11 @@ And compilation/linking flags such as: - _Fedora 35_ - _OpenBSD 7.0_ -A _Dockerfile_ is provided but be wary: the compiled binaries inside the docker image are heavily dependent on the CPU platform/version and _not_ portable. You **have** to build the image on the actual CPU you want to test, otherwise you may stumble upon ```core dumped: illegal instruction``` errors. +## Docker support + +A _Dockerfile_ is provided and used by ```make docker``` but be wary: the compiled binaries inside the docker image are heavily dependent on the CPU platform/version and _not_ portable. + +You **have** to build the image on the actual CPU you want to test, otherwise you may stumble upon ```core dumped: illegal instruction``` errors. ## Results @@ -38,7 +42,7 @@ Results are stored as JSON objects in an unique file for each run, following thi ## Dependencies -- Compiler: ```clang``` and ```gcc``` +- Compilers: ```clang``` and ```gcc``` - Linker: ```lld``` - For upload: ```openssh``` and ```uuid``` - The C library static symbols, on Fedora: ```glibc-static``` @@ -49,7 +53,7 @@ Results are stored as JSON objects in an unique file for each run, following thi ### PoC only -```make poc``` will compile and execute v1 and v2 executable once using clang and no optimisations. +```make poc``` will compile and execute v1 and v2 executables once using clang and no optimisations. ### Within docker @@ -63,9 +67,11 @@ Results are stored as JSON objects in an unique file for each run, following thi ```make build``` will only build the experiment binaries. -To build using multiple processes: +### Cleanup -```make [-j XXX] build``` where ```XXX``` is the number of parallel processes. +```make clean``` will remove experiment binaries and result files. + +```make dockerclean``` will remove the _octopus_ image. ## Results aggregation