Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sbin/cgdconfig
The change is correct; this is how it is done everywhere else in the tree.
You are right about -pthread doing more than adding -lpthread, but
in that case, the -pthread should be added to CFLAGS/COPTS etc,
not LDADD so that it is effective during the compilation phase too,
not just the link phase. When I made the change, I considered going
through the tree and adding -pthread to the CFLAGS/COPTS in the
Makefiles where -pthread is in LDADD, but I did not want to do a
half-assed job without thinking about it more:
1. which compilation flag should we add -pthread to? CFLAGS or
COPTS? What about c++?
2. do we remove the LDADD/DPADD pthread settings? I am thinking
perhaps not, it does not hurt, plus the DPADD will cause a rebuild
when libpthread changes.
The libargon addition to cgdconfig broke lint building because lint h
as not been taught about -pthread yet, and fixing it the way I fixed it,
makes the lint build work again and is consistent with the rest of the tree.
Best,
christos
> On Nov 28, 2021, at 10:42 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
>
>
>
>> On Nov 27, 2021, at 6:01 PM, Christos Zoulas <christos%netbsd.org@localhost> wrote:
>>
>> Module Name: src
>> Committed By: christos
>> Date: Sun Nov 28 02:01:30 UTC 2021
>>
>> Modified Files:
>> src/sbin/cgdconfig: Makefile
>>
>> Log Message:
>> -lpthread to LDADD (fixes lint build)
>
> This change is wrong. The -pthread option to the compiler does more than just add -lpthread to the link phase.
>
> -- thorpej
Home |
Main Index |
Thread Index |
Old Index