util/crossgcc/buildgcc: quote parameters that may have spaces

On certain versions of /bin/sh assigning variables with spaces
unquoted leads to failures. Therefore, quote variables that
are known to be passed in that have spaces.

Change-Id: I007c56c3bfb8183bb4b16cf0591f6aa508fd105d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14280
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Aaron Durbin 2016-04-07 16:56:25 -05:00
parent 7bd886b503
commit 0ac4e5a7f8
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ searchtool()
# Run a compile check of the specified library option to see if it's installed # Run a compile check of the specified library option to see if it's installed
check_for_library() { check_for_library() {
local LIBRARY_FLAGS=$1 local LIBRARY_FLAGS=$1
local LIBRARY_PACKAGES=$2 local LIBRARY_PACKAGES="$2"
local LIBTEST_FILE=.libtest local LIBTEST_FILE=.libtest
echo "int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }" > "${LIBTEST_FILE}.c" echo "int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }" > "${LIBTEST_FILE}.c"