[Buildroot] [git commit branch/2022.02.x] support/scripts: don't require gawk to generate glibc gconv modules

Peter Korsgaard peter at korsgaard.com
Fri Nov 4 07:39:54 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=89fa62f1ae6dc06b9b70a30f5394b20cc248977c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x

When only a subset of the glibc gconv modules are installed, we need to
generate a trimmed-down list of available modules. We currently use gawk
for that.

However, we are not using any GNU extension in that awk script, and it
happens to work as expected when using mawk (which has no GNU
extension).

Commit 11c1076db9a5 (toolchain: add option to copy the gconv libraries)
did not explain why it used gawk explicitly, and given the age for that
commit, we doubt we'd be able to have the involved participants recall
anything from that period...

Besides, gawk is not a requirement for Buildroot.

Switch over to using plain awk.

Signed-off-by: Yann E. MORIN <yann.morin at orange.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
(cherry picked from commit 822cc1ebc42cc43877a20ca51d94689aed3e4424)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 support/scripts/expunge-gconv-modules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/scripts/expunge-gconv-modules b/support/scripts/expunge-gconv-modules
index 03012c1ce3..bc60fc0ce4 100755
--- a/support/scripts/expunge-gconv-modules
+++ b/support/scripts/expunge-gconv-modules
@@ -19,7 +19,7 @@
 # we handle each with slightly different code, since the second never has
 # associated aliases.
 
-gawk -v files="${1}" '
+awk -v files="${2}" '
 $1 == "alias" {
     aliases[$3] = aliases[$3] " " $2;
 }



More information about the buildroot mailing list