diff options
-rw-r--r-- | round-robin.sh | 26 | ||||
-rwxr-xr-x | tcwg_bmk-build.sh | 2 |
2 files changed, 26 insertions, 2 deletions
diff --git a/round-robin.sh b/round-robin.sh index ee18731d..297e4646 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -319,6 +319,12 @@ build_abe () shift done + local patch_branch="" + if [ $# -gt 0 ] && [ x"$1" = x"--patch" ]; then + patch_branch="$2" + shift 2 + fi + if [ x"$project" = x"gcc" ] && [ $# != 0 ]; then stage="$stage $*" fi @@ -332,6 +338,7 @@ build_abe () local custom_abe_src_opt="" local git_dir="$project" + local n_patches=0 case "$component" in # Use our custom sources for everything, but kernel headers and dejagnu. linux|dejagnu) ;; @@ -342,6 +349,12 @@ build_abe () if ! $check; then clone_repo $project + if [ x"$patch_branch" != x"" ]; then + git -C $project fetch "https://git.linaro.org/toolchain/$project.git" "refs/heads/$patch_branch" + git -C $project cherry-pick FETCH_HEAD + n_patches=1 + fi + # Don't use ABE's repo clone functions and setup abe/snapshots/ # directory to have the right entries. local git_path @@ -398,7 +411,18 @@ build_abe () $target_opt \ --extraconfigdir config/master \ $custom_abe_src_opt \ - $stage + $stage & + res=0 && wait $! || res=$? + + # Revert patches if applied. + if [ -d ../$project ]; then + git -C ../$project reset --hard HEAD~$n_patches + fi + + # If abe failed to build component, return exit status. + if [ x"$res" != x"0" ]; then + return $res + fi ccache -s if $check; then diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index 3cfb7f2b..a55b396c 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -598,7 +598,7 @@ case "${rr[components]}" in run_step skip_on_fail -6 build_abe newlib ;; esac -run_step skip_on_fail -5 build_abe stage2 -- "${gcc_override_configure[@]}" +run_step skip_on_fail -5 build_abe stage2 -- "--patch" "linaro-local/vect-metric-branch" "${gcc_override_configure[@]}" case "${rr[toolchain]}" in llvm) run_step skip_on_fail -3 build_llvm true ;; esac |