[v5,02/17] buildtools: fix build with busybox

Message ID 20210225182250.1149592-3-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Headers
Series Alpine/musl build support |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Feb. 25, 2021, 6:22 p.m. UTC
  If using busybox for mktemp and awk (as in Alpine),
some bugs prevent the script from running:

1/ It seems busybox mktemp requires the pattern to have at least
6 X and no other suffix.
The same has been fixed for other scripts in the past:
commit 3771edc35438 ("buildtools: fix build for some mktemp")

2/ It seems busybox awk does not accept the regex ^.*{
except if the opening curly brace is escaped.

Fixes: 4c82473412e8 ("build: add internal tag check")
Fixes: 68b1f1cda5b4 ("build: check AVX512 rather than binutils version")
Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 buildtools/binutils-avx512-check.sh | 2 +-
 buildtools/check-symbols.sh         | 2 +-
 buildtools/map-list-symbol.sh       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Bruce Richardson Feb. 26, 2021, 9:11 a.m. UTC | #1
On Thu, Feb 25, 2021 at 07:22:35PM +0100, Thomas Monjalon wrote:
> If using busybox for mktemp and awk (as in Alpine),
> some bugs prevent the script from running:
> 
> 1/ It seems busybox mktemp requires the pattern to have at least
> 6 X and no other suffix.
> The same has been fixed for other scripts in the past:
> commit 3771edc35438 ("buildtools: fix build for some mktemp")
> 
> 2/ It seems busybox awk does not accept the regex ^.*{
> except if the opening curly brace is escaped.
> 
> Fixes: 4c82473412e8 ("build: add internal tag check")
> Fixes: 68b1f1cda5b4 ("build: check AVX512 rather than binutils version")
> Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  

Patch

diff --git a/buildtools/binutils-avx512-check.sh b/buildtools/binutils-avx512-check.sh
index a7e068140f..2a833b64b7 100755
--- a/buildtools/binutils-avx512-check.sh
+++ b/buildtools/binutils-avx512-check.sh
@@ -3,7 +3,7 @@ 
 # Copyright(c) 2020 Intel Corporation
 
 AS=${AS:-as}
-OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX.o)
+OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX)
 trap 'rm -f "$OBJFILE"' EXIT
 # from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028
 GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}'
diff --git a/buildtools/check-symbols.sh b/buildtools/check-symbols.sh
index e407553a34..6723e38450 100755
--- a/buildtools/check-symbols.sh
+++ b/buildtools/check-symbols.sh
@@ -18,7 +18,7 @@  then
 	exit 0
 fi
 
-DUMPFILE=$(mktemp -t dpdk.${0##*/}.XXX.objdump)
+DUMPFILE=$(mktemp -t dpdk.${0##*/}.XXXXXX)
 trap 'rm -f "$DUMPFILE"' EXIT
 objdump -t $OBJFILE >$DUMPFILE
 
diff --git a/buildtools/map-list-symbol.sh b/buildtools/map-list-symbol.sh
index 5509b4a7fa..3bf9bd66f8 100755
--- a/buildtools/map-list-symbol.sh
+++ b/buildtools/map-list-symbol.sh
@@ -44,7 +44,7 @@  for file in $@; do
 			ret = 1;
 		}
 	}
-	/^.*{/ {
+	/^.*\{/ {
 		if ("'$section'" == "all" || $1 == "'$section'") {
 			current_section = $1;
 		}