summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-08-08 09:28:33 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-08-08 09:31:23 +0000
commite30c3f6e41d5754c0544c6a5eaa8643173ea51d6 (patch)
tree155b0c05ed535583ab13370821d297336847b7bc
parent0b55ca0d89d49696e9e68b35fc4ccfd97eb16397 (diff)
tcwg_gnu-build.sh: Clean sysroot when re-building linux headers or glibc
Change-Id: I6a3b8ba5552fb82762d7ef72a4d3202dd37ffc8a
-rw-r--r--round-robin.sh20
-rwxr-xr-xtcwg_bmk-build.sh21
-rwxr-xr-xtcwg_gnu-build.sh7
3 files changed, 26 insertions, 22 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 ()
{
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh
index b5b6baaf..6bd60a12 100755
--- a/tcwg_bmk-build.sh
+++ b/tcwg_bmk-build.sh
@@ -152,8 +152,7 @@ case "${rr[mode]}" in
case $single_updated_component in
binutils) default_start_at="build_abe-binutils" ;;
gcc) default_start_at="build_abe-stage1" ;;
- linux) default_start_at="build_abe-linux" ;;
- glibc) default_start_at="clean_sysroot" ;;
+ linux|glibc) default_start_at="clean_sysroot" ;;
llvm) default_start_at="build_llvm-true" ;;
newlib) default_start_at="build_abe-newlib" ;;
*) assert_with_msg \
@@ -173,24 +172,6 @@ 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 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"
- )
-}
-
benchmark ()
{
(
diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh
index a850d8d5..3dd7cb89 100755
--- a/tcwg_gnu-build.sh
+++ b/tcwg_gnu-build.sh
@@ -89,8 +89,7 @@ case "${rr[mode]}" in
gcc:tcwg_gnu_native_*) default_start_at="build_abe-stage1" ;;
gcc:tcwg_gcc_check) default_start_at="build_abe-gcc" ;;
gcc:tcwg_gcc_*bootstrap) default_start_at="build_abe-${type_of_test#check_}" ;;
- linux:*) default_start_at="build_abe-linux" ;;
- glibc:*) default_start_at="build_abe-glibc" ;;
+ linux:*|glibc:*) default_start_at="clean_sysroot" ;;
gdb:*) default_start_at="build_abe-gdb" ;;
qemu:*) default_start_at="build_abe-qemu" ;;
*) assert_with_msg "Trying to bisecting unknown component: $(print_single_updated_component)" false ;;
@@ -202,6 +201,7 @@ case "${rr[ci_project]}" in
run_step skip_on_fail 0 true
run_step skip_on_fail 1 build_abe binutils
run_step skip_on_fail 2 build_abe stage1
+ run_step skip_on_fail x clean_sysroot
run_step skip_on_fail 3 build_abe linux
run_step skip_on_fail 4 build_abe glibc
run_step skip_on_fail 5 build_abe stage2
@@ -211,6 +211,7 @@ case "${rr[ci_project]}" in
tcwg_gnu_cross_check_*)
run_step skip_on_fail -8 build_abe binutils
run_step skip_on_fail -7 build_abe stage1
+ run_step skip_on_fail x clean_sysroot
run_step skip_on_fail -6 build_abe linux
run_step skip_on_fail -5 build_abe glibc
run_step skip_on_fail -4 build_abe stage2
@@ -223,6 +224,7 @@ case "${rr[ci_project]}" in
run_step skip_on_fail 0 true
run_step skip_on_fail 1 build_abe binutils
run_step skip_on_fail 2 build_abe stage1
+ run_step skip_on_fail x clean_sysroot
run_step skip_on_fail 3 build_abe linux
run_step skip_on_fail 4 build_abe glibc
run_step skip_on_fail 5 build_abe stage2
@@ -231,6 +233,7 @@ case "${rr[ci_project]}" in
tcwg_gnu_native_check_*)
run_step skip_on_fail -8 build_abe binutils
run_step skip_on_fail -7 build_abe stage1
+ run_step skip_on_fail x clean_sysroot
run_step skip_on_fail -6 build_abe linux
run_step skip_on_fail -5 build_abe glibc
run_step skip_on_fail -4 build_abe stage2