benchtests: Do not build bench-timing-type with MODULE_NAME=libc

Message ID 20210126153340.GA8125@aloka.lostca.se
State Committed
Commit 3725ee39dbd4d7c17fc276b3ea4248cc16e4b522
Headers
Series benchtests: Do not build bench-timing-type with MODULE_NAME=libc |

Commit Message

Arjun Shankar Jan. 26, 2021, 3:33 p.m. UTC
  From: Arjun Shankar <arjun@redhat.com>

Since commit 2682695e5c7a, `make bench-build' with `--enable-static-pie'
fails due to bench-timing-type being incorrectly built with MODULE_NAME
set to `libc'.  This commit sets MODULE_NAME to nonlib, thus fixing the
build failure.
---
 benchtests/Makefile | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
  

Comments

Carlos O'Donell Jan. 26, 2021, 3:57 p.m. UTC | #1
On 1/26/21 10:33 AM, Arjun Shankar wrote:
> From: Arjun Shankar <arjun@redhat.com>
> 
> Since commit 2682695e5c7a, `make bench-build' with `--enable-static-pie'
> fails due to bench-timing-type being incorrectly built with MODULE_NAME
> set to `libc'.  This commit sets MODULE_NAME to nonlib, thus fixing the
> build failure.

This looks good to me.

Adhemerval, Can we commit this please? It unblocks Fedora rebase and
testing.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  benchtests/Makefile | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/benchtests/Makefile b/benchtests/Makefile
> index 4cd99deb33..12bd25a57c 100644
> --- a/benchtests/Makefile
> +++ b/benchtests/Makefile
> @@ -156,13 +156,6 @@ ifdef DETAILED
>  DETAILED_OPT := -d
>  endif
>  
> -# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
> -# for all these modules.
> -cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
> -		 $(binaries-bench-malloc:=.c)
> -lib := nonlib
> -include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
> -
>  bench-deps := bench-skeleton.c bench-timing.h Makefile
>  
>  run-bench = $(test-wrapper-env) \
> @@ -171,6 +164,13 @@ run-bench = $(test-wrapper-env) \
>  
>  timing-type := $(objpfx)bench-timing-type
>  
> +# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
> +# for all these modules.
> +cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
> +		 $(binaries-bench-malloc:=.c) $(timing-type:=.c)
> +lib := nonlib
> +include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
> +
>  bench-clean:
>  	rm -f $(binaries-bench) $(addsuffix .o,$(binaries-bench))
>  	rm -f $(binaries-benchset) $(addsuffix .o,$(binaries-benchset))
>
  
Adhemerval Zanella Jan. 26, 2021, 4:12 p.m. UTC | #2
On 26/01/2021 12:57, Carlos O'Donell wrote:
> On 1/26/21 10:33 AM, Arjun Shankar wrote:
>> From: Arjun Shankar <arjun@redhat.com>
>>
>> Since commit 2682695e5c7a, `make bench-build' with `--enable-static-pie'
>> fails due to bench-timing-type being incorrectly built with MODULE_NAME
>> set to `libc'.  This commit sets MODULE_NAME to nonlib, thus fixing the
>> build failure.
> 
> This looks good to me.
> 
> Adhemerval, Can we commit this please? It unblocks Fedora rebase and
> testing.
> 
> Reviewed-by: Carlos O'Donell <carlos@redhat.com>

Ok for 2.33.

> 
>> ---
>>  benchtests/Makefile | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/benchtests/Makefile b/benchtests/Makefile
>> index 4cd99deb33..12bd25a57c 100644
>> --- a/benchtests/Makefile
>> +++ b/benchtests/Makefile
>> @@ -156,13 +156,6 @@ ifdef DETAILED
>>  DETAILED_OPT := -d
>>  endif
>>  
>> -# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
>> -# for all these modules.
>> -cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
>> -		 $(binaries-bench-malloc:=.c)
>> -lib := nonlib
>> -include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
>> -
>>  bench-deps := bench-skeleton.c bench-timing.h Makefile
>>  
>>  run-bench = $(test-wrapper-env) \
>> @@ -171,6 +164,13 @@ run-bench = $(test-wrapper-env) \
>>  
>>  timing-type := $(objpfx)bench-timing-type
>>  
>> +# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
>> +# for all these modules.
>> +cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
>> +		 $(binaries-bench-malloc:=.c) $(timing-type:=.c)
>> +lib := nonlib
>> +include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
>> +
>>  bench-clean:
>>  	rm -f $(binaries-bench) $(addsuffix .o,$(binaries-bench))
>>  	rm -f $(binaries-benchset) $(addsuffix .o,$(binaries-benchset))
>>
> 
>
  

Patch

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 4cd99deb33..12bd25a57c 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -156,13 +156,6 @@  ifdef DETAILED
 DETAILED_OPT := -d
 endif
 
-# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
-# for all these modules.
-cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
-		 $(binaries-bench-malloc:=.c)
-lib := nonlib
-include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
-
 bench-deps := bench-skeleton.c bench-timing.h Makefile
 
 run-bench = $(test-wrapper-env) \
@@ -171,6 +164,13 @@  run-bench = $(test-wrapper-env) \
 
 timing-type := $(objpfx)bench-timing-type
 
+# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
+# for all these modules.
+cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
+		 $(binaries-bench-malloc:=.c) $(timing-type:=.c)
+lib := nonlib
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
+
 bench-clean:
 	rm -f $(binaries-bench) $(addsuffix .o,$(binaries-bench))
 	rm -f $(binaries-benchset) $(addsuffix .o,$(binaries-benchset))