benchtests: Use "=" instead of ":=" [BZ #28970]

Message ID 20220316154348.250262-1-hjl.tools@gmail.com
State Committed
Commit 564f7ae7b45ee00e8e35499e462d28ad45c56022
Headers
Series benchtests: Use "=" instead of ":=" [BZ #28970] |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit fail Patch series failed to apply

Commit Message

H.J. Lu March 16, 2022, 3:43 p.m. UTC
  Use "=" instead of ":=" to allow sysdeps Makefiles to add more benches
to bench and benchset.  This fixes BZ #28970.
---
 benchtests/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Sunil Pandey March 16, 2022, 3:46 p.m. UTC | #1
On Wed, Mar 16, 2022 at 8:44 AM H.J. Lu via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Use "=" instead of ":=" to allow sysdeps Makefiles to add more benches
> to bench and benchset.  This fixes BZ #28970.
> ---
>  benchtests/Makefile | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/benchtests/Makefile b/benchtests/Makefile
> index d513b29903..8dfca592fd 100644
> --- a/benchtests/Makefile
> +++ b/benchtests/Makefile
> @@ -296,9 +296,11 @@ bench-extra-objs = json-lib.o
>  extra-objs += $(bench-extra-objs)
>  others-extras = $(bench-extra-objs)
>
> -binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
> +# NB: Use "=" instead of ":=" since sysdeps Makefiles may add more
> +# benches.
> +binaries-bench = $(addprefix $(objpfx)bench-,$(bench))
>  extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
> -binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
> +binaries-benchset = $(addprefix $(objpfx)bench-,$(benchset))
>  extra-objs += $(addsuffix .o,$(addprefix bench-,$(benchset)))
>  binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
>  extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench-malloc)))
> --
> 2.35.1
>

LGTM

Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
  
Noah Goldstein March 16, 2022, 3:47 p.m. UTC | #2
On Wed, Mar 16, 2022 at 10:43 AM H.J. Lu via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Use "=" instead of ":=" to allow sysdeps Makefiles to add more benches
> to bench and benchset.  This fixes BZ #28970.
> ---
>  benchtests/Makefile | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/benchtests/Makefile b/benchtests/Makefile
> index d513b29903..8dfca592fd 100644
> --- a/benchtests/Makefile
> +++ b/benchtests/Makefile
> @@ -296,9 +296,11 @@ bench-extra-objs = json-lib.o
>  extra-objs += $(bench-extra-objs)
>  others-extras = $(bench-extra-objs)
>
> -binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
> +# NB: Use "=" instead of ":=" since sysdeps Makefiles may add more
> +# benches.
> +binaries-bench = $(addprefix $(objpfx)bench-,$(bench))
>  extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
> -binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
> +binaries-benchset = $(addprefix $(objpfx)bench-,$(benchset))
>  extra-objs += $(addsuffix .o,$(addprefix bench-,$(benchset)))
>  binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
>  extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench-malloc)))
> --
> 2.35.1
>

LGTM.
  

Patch

diff --git a/benchtests/Makefile b/benchtests/Makefile
index d513b29903..8dfca592fd 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -296,9 +296,11 @@  bench-extra-objs = json-lib.o
 extra-objs += $(bench-extra-objs)
 others-extras = $(bench-extra-objs)
 
-binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
+# NB: Use "=" instead of ":=" since sysdeps Makefiles may add more
+# benches.
+binaries-bench = $(addprefix $(objpfx)bench-,$(bench))
 extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
-binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
+binaries-benchset = $(addprefix $(objpfx)bench-,$(benchset))
 extra-objs += $(addsuffix .o,$(addprefix bench-,$(benchset)))
 binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
 extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench-malloc)))