buildgcc: replace [[ ... == ... ]] with something more portable
using grep is an extra process invocation, but it's not a bashism. Also match precisely, so AGCC doesn't trigger on GCC (we don't have collisions right now, but we won't have to deal with them in the future) Change-Id: I242833c350b7f1e6a6793f288c1aae0b50d57a26 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10518 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
1f38d79868
commit
f2c15f5136
|
@ -238,6 +238,11 @@ fn_exists()
|
|||
type $1 2>/dev/null | grep -q 'is a function'
|
||||
}
|
||||
|
||||
is_package_enabled()
|
||||
{
|
||||
echo "$PACKAGES" |grep -q "\<$1\>"
|
||||
}
|
||||
|
||||
build() {
|
||||
package=$1
|
||||
|
||||
|
@ -248,7 +253,7 @@ build() {
|
|||
|
||||
mkdir -p ${BUILDDIR}
|
||||
|
||||
[[ "$PACKAGES" == *$package* ]] && \
|
||||
is_package_enabled "$package" && \
|
||||
if [ -f ${BUILDDIR}/.success ]; then
|
||||
printf "Skipping $package as it is already built\n"
|
||||
else
|
||||
|
@ -569,7 +574,7 @@ fi
|
|||
# Set up host compiler and flags needed for various OSes
|
||||
|
||||
CC=cc
|
||||
if [[ "$PACKAGES" == *GCC* ]]; then
|
||||
if is_package_enabled "GCC"; then
|
||||
if [ $UNAME = "Darwin" ]; then
|
||||
#GCC_OPTIONS="$GCC_OPTIONS --enable-threads=posix"
|
||||
|
||||
|
|
Loading…
Reference in New Issue