* [PATCH -next v2] kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
@ 2024-06-05 17:58 Richard Acayan
2024-06-05 18:15 ` Nathan Chancellor
2024-06-06 13:16 ` Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Richard Acayan @ 2024-06-05 17:58 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Kent Overstreet, linux-kbuild
Cc: Jon Hunter, Richard Acayan
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")
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
---
scripts/link-vmlinux.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 46ce5d04dbeb..518c70b8db50 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -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()
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -next v2] kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
2024-06-05 17:58 [PATCH -next v2] kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh Richard Acayan
@ 2024-06-05 18:15 ` Nathan Chancellor
2024-06-06 13:16 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2024-06-05 18:15 UTC (permalink / raw)
To: Richard Acayan
Cc: Masahiro Yamada, Nicolas Schier, Kent Overstreet, linux-kbuild,
Jon Hunter
On Wed, Jun 05, 2024 at 01:58:09PM -0400, Richard Acayan wrote:
> 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")
> Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> scripts/link-vmlinux.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 46ce5d04dbeb..518c70b8db50 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -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()
> --
> 2.45.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -next v2] kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
2024-06-05 17:58 [PATCH -next v2] kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh Richard Acayan
2024-06-05 18:15 ` Nathan Chancellor
@ 2024-06-06 13:16 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2024-06-06 13:16 UTC (permalink / raw)
To: Richard Acayan
Cc: Nathan Chancellor, Nicolas Schier, Kent Overstreet, linux-kbuild,
Jon Hunter
On Thu, Jun 6, 2024 at 2:59 AM Richard Acayan <mailingradian@gmail.com> wrote:
>
> 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")
> Signed-off-by: Richard Acayan <mailingradian@gmail.com>
> ---
Applied with Kent's Reported-by.
Thanks!
> scripts/link-vmlinux.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 46ce5d04dbeb..518c70b8db50 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -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()
> --
> 2.45.2
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-06 13:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 17:58 [PATCH -next v2] kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh Richard Acayan
2024-06-05 18:15 ` Nathan Chancellor
2024-06-06 13:16 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox