]> Git Repo - J-linux.git/commitdiff
kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
authorRichard Acayan <[email protected]>
Wed, 5 Jun 2024 17:58:09 +0000 (13:58 -0400)
committerMasahiro Yamada <[email protected]>
Thu, 6 Jun 2024 23:42:14 +0000 (08:42 +0900)
In commit b18b047002b7 ("kbuild: change scripts/mksysmap into sed
script"), the mksysmap script was transformed into a sed script,
made directly executable with "#!/bin/sed -f". Apparently, the path to
sed is different on NixOS.

The shebang can't use the env command, otherwise the "sed -f" command
would be treated as a single argument. This can be solved with the -S
flag, but that is a GNU extension. Explicitly use sed instead of relying
on the executable shebang to fix NixOS builds without breaking build
environments using Busybox.

Fixes: b18b047002b7 ("kbuild: change scripts/mksysmap into sed script")
Reported-by: Kent Overstreet <[email protected]>
Signed-off-by: Richard Acayan <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Dmitry Safonov <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
scripts/link-vmlinux.sh

index 46ce5d04dbeb100ddbe524baa36ccd63415e8738..518c70b8db5078715be6f142f6103a714b6d3063 100755 (executable)
@@ -193,7 +193,7 @@ kallsyms_step()
 mksysmap()
 {
        info NM ${2}
-       ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}"
+       ${NM} -n "${1}" | sed -f "${srctree}/scripts/mksysmap" > "${2}"
 }
 
 sorttable()
This page took 0.049057 seconds and 4 git commands to generate.