diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-08-08 09:28:33 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-08-08 09:31:23 +0000 |
commit | e30c3f6e41d5754c0544c6a5eaa8643173ea51d6 (patch) | |
tree | 155b0c05ed535583ab13370821d297336847b7bc /round-robin.sh | |
parent | 0b55ca0d89d49696e9e68b35fc4ccfd97eb16397 (diff) |
tcwg_gnu-build.sh: Clean sysroot when re-building linux headers or glibc
Change-Id: I6a3b8ba5552fb82762d7ef72a4d3202dd37ffc8a
Diffstat (limited to 'round-robin.sh')
-rw-r--r-- | round-robin.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/round-robin.sh b/round-robin.sh index 60e28cf1..de33c873 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -447,6 +447,26 @@ build_abe () ) } +# If we bisect a regression between different major versions of Glibc, +# then we might get a mixed sysroot with several versions of ld-M.N.so and +# other binaries installed side-by-side. Such a sysroot will break +# benchmarking, which requires a single ld-*.so binary to be present. +# Similarly, weird problems can occur if we are bisecting linux +# and re-installing kernel headers one on top another. +# Forcefully delete sysroot before building C library or linux headers. +clean_sysroot () +{ + ( + set -euf -o pipefail + + local gnu_target sysroot + gnu_target=$(print_gnu_target ${rr[target]}) + sysroot="$(pwd)/abe/builds/destdir/x86_64-pc-linux-gnu/$gnu_target/libc" + + rm -rf "$sysroot" + ) +} + # Build LLVM build_llvm () { |