From 55e45fa9fcd61c0653cd454f598bf2710a71b995 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Fri, 13 May 2016 16:54:30 +0200 Subject: Ignore setting a libc version incompatible with the target, unless --set libc=XXX is used. This allows: $ abe.sh --target arm-none-eabi glibc=XXX newlib=YYY or $ abe.sh --target arm-linux-gnueabi glibc=XXX newlib=YYY to succeed, using the appropriate libc. This makes it simpler to implement buildfarm jobs where we want to build several targets with given C library versions. Otherwise, we'd have to specialize the calls to abe depending on the target. This makes it possible to have a 'backport'-type job decide which libc branches to use according to the gcc branch, and to provide buildfarm jobs with these versions, whatever the target types being built. Change-Id: Ifd0716ba01374343bf665af522a9af1e9f64e2d3 --- abe.sh | 13 +++++-------- test.sh | 21 --------------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/abe.sh b/abe.sh index d7d18d42..925c116e 100755 --- a/abe.sh +++ b/abe.sh @@ -341,7 +341,9 @@ OPTIONS This option specifies a particular version of a package that might differ from the default version in the - package config files. + package config files. This is taken into account if the + package is required during the build, otherwise this + option has not effect. For a specific package use a version tag that matches a setting in a sources.conf file, a snapshots identifier, @@ -445,6 +447,7 @@ crosscheck_clibrary_target() { local test_clibrary="$1" local test_target="$2" + case ${test_target} in arm*-eabi|aarch64*-*elf|*-mingw32) # Bare metal targets only support newlib. @@ -1079,22 +1082,16 @@ while test $# -gt 0; do fi # Only allow valid combinations of target and clibrary. - crosscheck_clibrary_target ${name} ${target} - if test $? -gt 0; then - build_failure - fi + # Continue to process individually. case ${name} in eglibc) - clibrary="eglibc" eglibc_version="${value}" ;; glibc) - clibrary="glibc" glibc_version="${value}" ;; n*|newlib) - clibrary="newlib" newlib_version="${value}" ;; *) diff --git a/test.sh b/test.sh index c8804e6a..eb886ee9 100755 --- a/test.sh +++ b/test.sh @@ -457,17 +457,6 @@ cb_commands="--target ${target} --set libc=${libc}" match='' test_pass "${cb_commands}" "${match}" -# Verify that setting glibc=glibc.git will fail for baremetal. -cb_commands="--dryrun --target aarch64-none-elf glibc=glibc.git" -match='crosscheck_clibrary_target' -test_failure "${cb_commands}" "${match}" - -# Verify that glibc=glibc.git will fail when se before the target -# for baremetal. -cb_commands="--dryrun glibc=glibc.git --target aarch64-none-elf" -match='crosscheck_clibrary_target' -test_failure "${cb_commands}" "${match}" - cb_commands="--snapshots" match='requires a directive' test_failure "${cb_commands}" "${match}" @@ -586,16 +575,6 @@ cb_commands="glibc=glibc.git" match='' test_pass "${cb_commands}" "${match}" -target="aarch64-none-elf" -cb_commands="--target ${target} glibc=glibc.git" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - -target="aarch64-none-elf" -cb_commands="--target ${target} glibc=eglibc.git" -match="crosscheck_clibrary_target" -test_failure "${cb_commands}" "${match}" - target="aarch64-none-elf" cb_commands="--target ${target} newlib=newlib.git" match='' -- cgit v1.2.3