Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sbin/cgdconfig




> On Nov 28, 2021, at 11:57 AM, Roland Illig <roland.illig%gmx.de@localhost> wrote:
>
> Am 28.11.2021 um 17:37 schrieb Jason Thorpe:
>>> On Nov 28, 2021, at 8:05 AM, Christos Zoulas <christos%zoulas.com@localhost>
>>> wrote:
>>>
>>> 1. which compilation flag should we add -pthread to? CFLAGS or
>>> COPTS? What about c++?
>>
>> GCC defines some preprocessor macros in response to -pthread, so …
>> CPPFLAGS?  Perhaps a better choice is to have a USE_PTHREADS that
>> individual program / library Makefiles can set to YES to cause the
>> right magic to happen in bsd.sys.mk?
>
> I like the idea of USE_PTHREADS.
>
> The option -pthread is not specified by POSIX and the GCC manual doesn't
> define which exact macros -pthread defines. Sure, Clang is compatible
> with GCC, but PCC doesn't need to. I don't want to add support for 3
> different compilers to lint. Having all the magic hidden behind a simple
> flag sounds easiest to me.
>

I agree!

christos

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index