Re: option -pthread in LDADD
Jason Thorpe <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
> On Nov 28, 2021, at 2:51 AM, Roland Illig <[email protected]> wrote: > > Am 28.11.2021 um 11:34 schrieb Martin Husemann: >> Shouldn't lint learn about -pthread? >> >> It should be just a shortcut for something like: >> >> -lpthread -D_REENTRANT=1 -D_PTHREADS=1 > > I think this knowledge doesn't belong in the source code of lint, I'd > rather put it into share/mk/*.mk, just like CPPFLAGS are already > translated in sys.mk. > > If lint would know about -pthread, should it know about -std=... as > well, or the various -Wl,... linker options? I'd rather keep all these > details away from lint as they are compiler-specific. Lint(1) should probably know about -std=, yes, and could alter its own checking behavior based on it. -Wl,… for the most part doesn’t impact which libraries are pulled in, so lint(1) shouldn’t need to care about those. -- thorpej