#8891 closed enhancement (invalid)
c++flag -pthread unsupported
Reported by: | cipri | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/POSIX | Version: | R1/alpha3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
gcc on haiku doesnt recognize the flag -pthread . As far as i was reading -pthread is normally (depending on the OS) equal: to -D_REENTRANT -lpthread
Change History (4)
follow-up: 2 comment:1 by , 12 years ago
Type: | bug → enhancement |
---|
comment:2 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Replying to umccullough:
At the very least, this is an enhancement request... And are you sure this is actually a POSIX requirement?
It's not. Also, _REENTRANT has no meaning on Haiku.
Also, there's no -lpthread support on haiku because pthread is in libroot (and AFAIK, POSIX doesn't define what lib it must reside in).
Correct.
comment:3 by , 12 years ago
As a note - any time you run into a makefile using -pthread, or -lpthread, they should be modified to conditionally check this. When a configure script detects pthread support in a header, it should not assume that -pthread or -lpthread should be used in the compiler/link options.
Same for -lm btw - which is another common issue when dealing with ports.
comment:4 by , 12 years ago
ok, so i replace -lpthread with -lroot. Is there any option that i need to add, to ensure thread safety?
At the very least, this is an enhancement request... And are you sure this is actually a POSIX requirement?
Also, there's no -lpthread support on haiku because pthread is in libroot (and AFAIK, POSIX doesn't define what lib it must reside in).