mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
kbuild: replace BASH-specific ${@:2} with shift and ${@}
${@:2} is BASH-specific extension, which makes link-vmlinux.sh rely on
BASH. Use shift and ${@} instead to fix this issue.
Reported-by: Stephen Rothwell <[email protected]>
Fixes: 341dfcf8d7 ("btf: expose BTF info through sysfs")
Cc: Stephen Rothwell <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Reviewed-by: Masahiro Yamada <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
parent
1e46c09ec1
commit
618916a4bf
1 changed files with 11 additions and 5 deletions
|
|
@ -57,12 +57,16 @@ modpost_link()
|
|||
|
||||
# Link of vmlinux
|
||||
# ${1} - output file
|
||||
# ${@:2} - optional extra .o files
|
||||
# ${2}, ${3}, ... - optional extra .o files
|
||||
vmlinux_link()
|
||||
{
|
||||
local lds="${objtree}/${KBUILD_LDS}"
|
||||
local output=${1}
|
||||
local objects
|
||||
|
||||
# skip output file argument
|
||||
shift
|
||||
|
||||
if [ "${SRCARCH}" != "um" ]; then
|
||||
objects="--whole-archive \
|
||||
${KBUILD_VMLINUX_OBJS} \
|
||||
|
|
@ -70,9 +74,10 @@ vmlinux_link()
|
|||
--start-group \
|
||||
${KBUILD_VMLINUX_LIBS} \
|
||||
--end-group \
|
||||
${@:2}"
|
||||
${@}"
|
||||
|
||||
${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} -o ${1} \
|
||||
${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} \
|
||||
-o ${output} \
|
||||
-T ${lds} ${objects}
|
||||
else
|
||||
objects="-Wl,--whole-archive \
|
||||
|
|
@ -81,9 +86,10 @@ vmlinux_link()
|
|||
-Wl,--start-group \
|
||||
${KBUILD_VMLINUX_LIBS} \
|
||||
-Wl,--end-group \
|
||||
${@:2}"
|
||||
${@}"
|
||||
|
||||
${CC} ${CFLAGS_vmlinux} -o ${1} \
|
||||
${CC} ${CFLAGS_vmlinux} \
|
||||
-o ${output} \
|
||||
-Wl,-T,${lds} \
|
||||
${objects} \
|
||||
-lutil -lrt -lpthread
|
||||
|
|
|
|||
Loading…
Reference in a new issue