diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-01-29 08:32:28 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-01-29 08:32:28 +0000 |
commit | 746f4c6a94661b4eaeacfc92e8a2b6670f6b6bde (patch) | |
tree | 31f017e8acd0a2b53d58f60c164bce21125d24de /tcwg_bmk-build.sh | |
parent | 148dbb20c4559cb020f1d6fe671e61bacfa547ea (diff) |
tcwg_bmk-build.sh: Fix failure when bisecting glibc across releases
Change-Id: Icababf1d9c659dc7c1ce443abf30c101c5067b63
Diffstat (limited to 'tcwg_bmk-build.sh')
-rwxr-xr-x | tcwg_bmk-build.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index 3a85e615..0a828122 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -134,7 +134,7 @@ case "${rr[mode]}" in case $single_updated_component in binutils) default_start_at="build_abe-binutils" ;; gcc) default_start_at="build_abe-stage1" ;; - glibc) default_start_at="build_abe-glibc" ;; + glibc) default_start_at="clean_sysroot" ;; llvm) default_start_at="build_llvm-true" ;; newlib) default_start_at="build_abe-newlib" ;; *) assert_with_msg \ @@ -154,6 +154,23 @@ fi run_step_init "$start_at" "$finish_at" "${rr[top_artifacts]}" "$verbose" +# 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. +# Forcefully delete sysroot before building C library. +clean_sysroot () +{ + ( + set -euf -o pipefail + + local sysroot + sysroot="$(pwd)/abe/builds/destdir/x86_64-pc-linux-gnu/$gnu_target/libc" + + rm -rf "$sysroot" + ) +} + benchmark () { ( @@ -550,6 +567,7 @@ run_step stop_on_fail -10 reset_artifacts run_step stop_on_fail x prepare_abe run_step skip_on_fail -9 build_abe binutils run_step skip_on_fail -8 build_abe stage1 -- "${gcc_override_configure[@]}" +run_step skip_on_fail x clean_sysroot case "${rr[components]}" in *glibc*) run_step skip_on_fail -7 build_abe linux |