diff options
| author | Nick Desaulniers <ndesaulniers@google.com> | 2020-09-25 11:07:04 -0700 |
|---|---|---|
| committer | Nick Desaulniers <ndesaulniers@google.com> | 2020-09-25 11:16:38 -0700 |
| commit | f2308c0f82ae1732cd711a0c9a38e42f99d47f50 (patch) | |
| tree | ff60930ccac6d404cfb40be2672bea6f818cec76 | |
| parent | 75f4a250d88cdbcec6344ec080c7c3ae3669f323 (diff) | |
| download | kernel_build-f2308c0f82ae1732cd711a0c9a38e42f99d47f50.tar.gz kernel_build-f2308c0f82ae1732cd711a0c9a38e42f99d47f50.tar.bz2 kernel_build-f2308c0f82ae1732cd711a0c9a38e42f99d47f50.zip | |
build.sh: fix DO_NOT_STRIP_MODULES when OBJCOPY unset
Moving builds from OBJCOPY=1 to LLVM=1 exposed a few errors from `find`
when it tried to exec OBJCOPY. To set a default value for parameter
expansion in Bash, use `:-` to delineate the value being expanded vs.
the default value.
See also: aosp/1177724.
Link: https://wiki.bash-hackers.org/syntax/pe#use_a_default_value
Bug: 169398087
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ie833c08749a5c5732d4c782c46fa3a139cc8e9aa
| -rwxr-xr-x | build.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -710,7 +710,7 @@ if [ -n "${MODULES}" ]; then if [ -n "${DO_NOT_STRIP_MODULES}" ]; then # strip debug symbols off initramfs modules find ${INITRAMFS_STAGING_DIR} -type f -name "*.ko" \ - -exec ${OBJCOPY:${CROSS_COMPILE}strip} --strip-debug {} \; + -exec ${OBJCOPY:-${CROSS_COMPILE}strip} --strip-debug {} \; fi # Re-run depmod to detect any dependencies between in-kernel and external |
