diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2016-03-09 14:34:28 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2016-03-24 14:52:44 +0100 |
commit | 01d7f68ef603b57b9029ac6fd72302c5917713dd (patch) | |
tree | 0796de352b819c0627f4101db510c913ece5054b | |
parent | c085b4ead2dd8ac928978f2d1b3ca6d26582dd85 (diff) |
Add support for --extraconfig <tool>=<path> option.bkk16-christophe
Change-Id: I6f8b63fc1d1432cd34d4c34cf531aaf21e359844
-rwxr-xr-x | abe.sh | 13 | ||||
-rwxr-xr-x | jenkins.sh | 13 | ||||
-rwxr-xr-x | lib/configure.sh | 10 |
3 files changed, 32 insertions, 4 deletions
@@ -26,6 +26,7 @@ usage() [--disable {install|update|make_docs|building}] [--dryrun] [--dump] [--enable {bootstrap|gerrit}] [--excludecheck {all|glibc|gcc|gdb|binutils}] + [--extraconfig <tool>=<path>] [--fetch <url>] [--force] [--help] [--host <host_triple>] [--infrastructure] [--interactive] [--list] [--manifest <manifest_file>] @@ -194,6 +195,9 @@ OPTIONS --check gdb --excludecheck gdb --check gdb + --extraconfig <tool>=<path> + Use an additional configuration file for tool. + --fetch <url> Fetch the specified URL into the snapshots directory. @@ -765,6 +769,8 @@ do_excludecheck= do_build= do_build_stage=stage2 +declare -A extraconfig + # Process the multiple command line arguments while test $# -gt 0; do # Get a URL for the source code for this toolchain component. The @@ -832,6 +838,13 @@ while test $# -gt 0; do shift ;; + --extraconfig|-extraconfig) + check_directive $1 extraconfig extraconfig $2 + extraconfig_tool=`echo $2 | sed 's/\(.*\)=.*/\1/'` + extraconfig_val=`echo $2 | sed 's/.*=\(.*\)/\1/'` + extraconfig[${extraconfig_tool}]="${extraconfig_val}" + shift + ;; --host|-h*) host=$2 shift @@ -94,7 +94,11 @@ rebuild=true orig_parameters="$@" -OPTS="`getopt -o s:g:c:w:o:f:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,fileserver:,logserver:,logname:,languages:,runtests,target:,bootstrap,help,excludecheck:,norebuild -- "$@"`" +# List of extra configuration files, per tool +# Syntax: --extracconfig <tool>=<path> +extraconfig="" + +OPTS="`getopt -o s:g:c:w:o:f:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,fileserver:,logserver:,logname:,languages:,runtests,target:,bootstrap,help,excludecheck:,norebuild,extraconfig: -- "$@"`" while test $# -gt 0; do case $1 in --gcc-branch) change="$change gcc=$2"; shift ;; @@ -113,6 +117,7 @@ while test $# -gt 0; do -b|--bootstrap) try_bootstrap="true" ;; --excludecheck) excludecheck_opt="$excludecheck_opt --excludecheck $2"; shift ;; --norebuild) rebuild=false ;; + --extraconfig) extraconfig="${extraconfig} --extraconfig $2" ;; -h|--help) usage ;; esac shift @@ -349,7 +354,7 @@ fi # Now we build the cross compiler, for a native compiler this becomes # the stage2 bootstrap build. ret=0 -$CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${check} ${tars} ${releasestr} ${platform} ${change} ${try_bootstrap} --timeout 100 --build all --disable make_docs > build.out 2> >(tee build.err >&2) || ret=$? +$CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${check} ${tars} ${releasestr} ${platform} ${change} ${try_bootstrap} ${extraconfig} --timeout 100 --build all --disable make_docs > build.out 2> >(tee build.err >&2) || ret=$? # If abe returned an error, make jenkins see this as a build failure if test $ret -gt 0; then @@ -450,9 +455,9 @@ if test x"${canadian}" = x"true"; then distro="`lsb_release -sc`" # Ubuntu Lucid uses an older version of Mingw32 if test x"${distro}" = x"lucid"; then - $CONFIG_SHELL ${abe_dir}/abe.sh --disable update --nodepends ${change} ${tars} --host=i586-mingw32msvc ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --disable update --nodepends ${change} ${tars} ${extraconfig} --host=i586-mingw32msvc ${platform} --build all else - $CONFIG_SHELL ${abe_dir}/abe.sh --disable update --nodepends ${change} ${tars} --host=i686-w64-mingw32 ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --disable update --nodepends ${change} ${tars} ${extraconfig} --host=i686-w64-mingw32 ${platform} --build all fi fi diff --git a/lib/configure.sh b/lib/configure.sh index af16cf8e..f660c111 100755 --- a/lib/configure.sh +++ b/lib/configure.sh @@ -133,6 +133,16 @@ configure_build() exit 1 fi + local this_extraconfig="${extraconfig[${toolname}]}" + if test -n "${this_extraconfig}"; then + if test -e "${this_extraconfig}"; then + notice "Sourcing extra config: ${this_extraconfig}" + . "${this_extraconfig}" + else + error "Warning: extraconfig file does not exist: ${this_extraconfig}" + exit 1 + fi + fi # See if this component depends on other components. They then need to be # built first. |