diff mbox series

[3/7] gmon: Remove ununsed LDFLAGS-tst-profile-static

Message ID 20241231182649.1811734-4-adhemerval.zanella@linaro.org
State New
Headers show
Series More fixes for building tests with clang | expand

Commit Message

Adhemerval Zanella Netto Dec. 31, 2024, 6:26 p.m. UTC
It also fixes the test buidl when using clang.
---
 gmon/Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

H.J. Lu Dec. 31, 2024, 8:52 p.m. UTC | #1
On Wed, Jan 1, 2025 at 2:27 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> It also fixes the test buidl when using clang.
> ---
>  gmon/Makefile | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/gmon/Makefile b/gmon/Makefile
> index db19c205d1..f44e7060a9 100644
> --- a/gmon/Makefile
> +++ b/gmon/Makefile
> @@ -43,10 +43,8 @@ tests = \
>    tst-sprofil \
>    # tests
>  ifeq ($(build-profile),yes)
> -tests += tst-profile-static
> -tests-static += tst-profile-static

Why are these changes included?

> -
> -LDFLAGS-tst-profile-static = -profile

Did you enable profile build? If yes, why is -profile unused?

> +tests  += tst-profile-static
> +tests-static   += tst-profile-static
>  endif
>
>  tests += tst-gmon-static
> --
> 2.43.0
>
Adhemerval Zanella Netto Jan. 2, 2025, 7:36 p.m. UTC | #2
On 31/12/24 17:52, H.J. Lu wrote:
> On Wed, Jan 1, 2025 at 2:27 AM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>> It also fixes the test buidl when using clang.
>> ---
>>  gmon/Makefile | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/gmon/Makefile b/gmon/Makefile
>> index db19c205d1..f44e7060a9 100644
>> --- a/gmon/Makefile
>> +++ b/gmon/Makefile
>> @@ -43,10 +43,8 @@ tests = \
>>    tst-sprofil \
>>    # tests
>>  ifeq ($(build-profile),yes)
>> -tests += tst-profile-static
>> -tests-static += tst-profile-static
> 
> Why are these changes included?
> 

They are not required, I will remove them.

>> -
>> -LDFLAGS-tst-profile-static = -profile
> 
> Did you enable profile build? If yes, why is -profile unused?

Yes and clang does not support -profile:

  clang: error: unknown argument '-profile'; did you mean '-fprofile'?

And afaiu the -profile option on linking only instructs gcc to use -lc_p
instead of -lc; which is not required anyway.

> 
>> +tests  += tst-profile-static
>> +tests-static   += tst-profile-static
>>  endif
>>
>>  tests += tst-gmon-static
>> --
>> 2.43.0
>>
> 
>
H.J. Lu Jan. 2, 2025, 9:05 p.m. UTC | #3
On Fri, Jan 3, 2025 at 3:36 AM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 31/12/24 17:52, H.J. Lu wrote:
> > On Wed, Jan 1, 2025 at 2:27 AM Adhemerval Zanella
> > <adhemerval.zanella@linaro.org> wrote:
> >>
> >> It also fixes the test buidl when using clang.
> >> ---
> >>  gmon/Makefile | 6 ++----
> >>  1 file changed, 2 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/gmon/Makefile b/gmon/Makefile
> >> index db19c205d1..f44e7060a9 100644
> >> --- a/gmon/Makefile
> >> +++ b/gmon/Makefile
> >> @@ -43,10 +43,8 @@ tests = \
> >>    tst-sprofil \
> >>    # tests
> >>  ifeq ($(build-profile),yes)
> >> -tests += tst-profile-static
> >> -tests-static += tst-profile-static
> >
> > Why are these changes included?
> >
>
> They are not required, I will remove them.
>
> >> -
> >> -LDFLAGS-tst-profile-static = -profile
> >
> > Did you enable profile build? If yes, why is -profile unused?
>
> Yes and clang does not support -profile:

I haven't done a profile build for a long time.  What does
the profile build do to libc.so and libc.a?

>   clang: error: unknown argument '-profile'; did you mean '-fprofile'?
>
> And afaiu the -profile option on linking only instructs gcc to use -lc_p
> instead of -lc; which is not required anyway.

If -lc_p isn't needed, should these tests be enabled for the
non-profile build?

> >
> >> +tests  += tst-profile-static
> >> +tests-static   += tst-profile-static
> >>  endif
> >>
> >>  tests += tst-gmon-static
> >> --
> >> 2.43.0
> >>
> >
> >
>
Adhemerval Zanella Netto Jan. 7, 2025, 12:44 p.m. UTC | #4
On 02/01/25 18:05, H.J. Lu wrote:
> On Fri, Jan 3, 2025 at 3:36 AM Adhemerval Zanella Netto
> <adhemerval.zanella@linaro.org> wrote:
>>
>>
>>
>> On 31/12/24 17:52, H.J. Lu wrote:
>>> On Wed, Jan 1, 2025 at 2:27 AM Adhemerval Zanella
>>> <adhemerval.zanella@linaro.org> wrote:
>>>>
>>>> It also fixes the test buidl when using clang.
>>>> ---
>>>>  gmon/Makefile | 6 ++----
>>>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/gmon/Makefile b/gmon/Makefile
>>>> index db19c205d1..f44e7060a9 100644
>>>> --- a/gmon/Makefile
>>>> +++ b/gmon/Makefile
>>>> @@ -43,10 +43,8 @@ tests = \
>>>>    tst-sprofil \
>>>>    # tests
>>>>  ifeq ($(build-profile),yes)
>>>> -tests += tst-profile-static
>>>> -tests-static += tst-profile-static
>>>
>>> Why are these changes included?
>>>
>>
>> They are not required, I will remove them.
>>
>>>> -
>>>> -LDFLAGS-tst-profile-static = -profile
>>>
>>> Did you enable profile build? If yes, why is -profile unused?
>>
>> Yes and clang does not support -profile:
> 
> I haven't done a profile build for a long time.  What does
> the profile build do to libc.so and libc.a?
> 
>>   clang: error: unknown argument '-profile'; did you mean '-fprofile'?
>>
>> And afaiu the -profile option on linking only instructs gcc to use -lc_p
>> instead of -lc; which is not required anyway.
> 
> If -lc_p isn't needed, should these tests be enabled for the
> non-profile build?

In fact I was mistaken about this, --enable-profile does build libc_p.a and
I think it would be better to just disable this tests while building tests
with clang.

> 
>>>
>>>> +tests  += tst-profile-static
>>>> +tests-static   += tst-profile-static
>>>>  endif
>>>>
>>>>  tests += tst-gmon-static
>>>> --
>>>> 2.43.0
>>>>
>>>
>>>
>>
> 
>
H.J. Lu Jan. 7, 2025, 1:14 p.m. UTC | #5
On Tue, Jan 7, 2025 at 8:44 PM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 02/01/25 18:05, H.J. Lu wrote:
> > On Fri, Jan 3, 2025 at 3:36 AM Adhemerval Zanella Netto
> > <adhemerval.zanella@linaro.org> wrote:
> >>
> >>
> >>
> >> On 31/12/24 17:52, H.J. Lu wrote:
> >>> On Wed, Jan 1, 2025 at 2:27 AM Adhemerval Zanella
> >>> <adhemerval.zanella@linaro.org> wrote:
> >>>>
> >>>> It also fixes the test buidl when using clang.
> >>>> ---
> >>>>  gmon/Makefile | 6 ++----
> >>>>  1 file changed, 2 insertions(+), 4 deletions(-)
> >>>>
> >>>> diff --git a/gmon/Makefile b/gmon/Makefile
> >>>> index db19c205d1..f44e7060a9 100644
> >>>> --- a/gmon/Makefile
> >>>> +++ b/gmon/Makefile
> >>>> @@ -43,10 +43,8 @@ tests = \
> >>>>    tst-sprofil \
> >>>>    # tests
> >>>>  ifeq ($(build-profile),yes)
> >>>> -tests += tst-profile-static
> >>>> -tests-static += tst-profile-static
> >>>
> >>> Why are these changes included?
> >>>
> >>
> >> They are not required, I will remove them.
> >>
> >>>> -
> >>>> -LDFLAGS-tst-profile-static = -profile
> >>>
> >>> Did you enable profile build? If yes, why is -profile unused?
> >>
> >> Yes and clang does not support -profile:
> >
> > I haven't done a profile build for a long time.  What does
> > the profile build do to libc.so and libc.a?
> >
> >>   clang: error: unknown argument '-profile'; did you mean '-fprofile'?
> >>
> >> And afaiu the -profile option on linking only instructs gcc to use -lc_p
> >> instead of -lc; which is not required anyway.
> >
> > If -lc_p isn't needed, should these tests be enabled for the
> > non-profile build?
>
> In fact I was mistaken about this, --enable-profile does build libc_p.a and
> I think it would be better to just disable this tests while building tests
> with clang.

It sounds reasonable.

> >
> >>>
> >>>> +tests  += tst-profile-static
> >>>> +tests-static   += tst-profile-static
> >>>>  endif
> >>>>
> >>>>  tests += tst-gmon-static
> >>>> --
> >>>> 2.43.0
> >>>>
> >>>
> >>>
> >>
> >
> >
>
diff mbox series

Patch

diff --git a/gmon/Makefile b/gmon/Makefile
index db19c205d1..f44e7060a9 100644
--- a/gmon/Makefile
+++ b/gmon/Makefile
@@ -43,10 +43,8 @@  tests = \
   tst-sprofil \
   # tests
 ifeq ($(build-profile),yes)
-tests += tst-profile-static
-tests-static += tst-profile-static
-
-LDFLAGS-tst-profile-static = -profile
+tests	+= tst-profile-static
+tests-static	+= tst-profile-static
 endif
 
 tests += tst-gmon-static