[v2,2/4] gmon: Disable tst-profile-static with clang

Message ID 20250110181508.350378-3-adhemerval.zanella@linaro.org (mailing list archive)
State Committed
Commit f28702b2eead1c65292c4fc84ecade2be201de0e
Headers
Series More fixes for building tests with clang |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Test passed

Commit Message

Adhemerval Zanella Netto Jan. 10, 2025, 6:12 p.m. UTC
  clang does not support -profile:

  clang: error: unknown argument '-profile'; did you mean '-fprofile'?
---
 gmon/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Sam James Jan. 10, 2025, 6:25 p.m. UTC | #1
> On 10 Jan 2025, at 18:15, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
> 
> clang does not support -profile:
> 
>  clang: error: unknown argument '-profile'; did you mean '-fprofile'?
> ---
> gmon/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 

ok

> diff --git a/gmon/Makefile b/gmon/Makefile
> index 6e39366a0c..26051ed2fb 100644
> --- a/gmon/Makefile
> +++ b/gmon/Makefile
> @@ -42,7 +42,8 @@ tests = \
>   tst-mcount-overflow \
>   tst-sprofil \
>   # tests
> -ifeq ($(build-profile),yes)
> +# clang does not support -profile to instruct linker to use lc_p
> +ifeq ($(build-profile)$(have-test-clang),yesno)
> tests += tst-profile-static
> tests-static += tst-profile-static
> 
> --
> 2.43.0
>
  

Patch

diff --git a/gmon/Makefile b/gmon/Makefile
index 6e39366a0c..26051ed2fb 100644
--- a/gmon/Makefile
+++ b/gmon/Makefile
@@ -42,7 +42,8 @@  tests = \
   tst-mcount-overflow \
   tst-sprofil \
   # tests
-ifeq ($(build-profile),yes)
+# clang does not support -profile to instruct linker to use lc_p
+ifeq ($(build-profile)$(have-test-clang),yesno)
 tests += tst-profile-static
 tests-static += tst-profile-static