Summary: | -pthread should have priority over -nostdlib | ||
---|---|---|---|
Product: | gcc | Reporter: | Simon Perreault <nomis80> |
Component: | other | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | gcc-bugs, Ralf.Wildenhues |
Priority: | P3 | ||
Version: | 4.1.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
Simon Perreault
2005-12-16 21:09:08 UTC
Why are you trying to use -nostdlib ? If libtool adds it then this is a libtool bug. The question whether libtool should use -nostdlib in conjunction with adding all the other stuff explicitly is surely a valid one, if not completely trivial and with some interesting corner cases. It is, however, completely orthogonal to this bug report. Documentation for -nostdlib does not suggest that -pthread is not honored any more. That is either a documentation bug, if the semantics were desired, or a driver bug, if not. Please decide, and fix this. Then, we may discuss about libtool semantics (preferably on the libtool lists). Cheers, Ralf The docs say: No startup files and only the libraries you specify will be passed to the linker. So this is not a GCC bug as it says only the libraries you specify will be passed to the linker, and -pthread is not you specifing a library. For the casual reader of the documentation, the precedence of this statement over | `-pthread' | Adds support for multithreading with the "pthreads" library. This | option sets flags for both the preprocessor and linker. or even the fact that the latter will add a library, are not obvious. It would be nice if the documentation could be more definite on both of these points. BTW, I believe libtool does the -nostdlib stuff because, at least in the past, not using it could cause situations where later libstdc++ would not be found automatically. I think at least for dlopen'ed modules depending on C++ libraries this is still the case (completely untested). Cheers, Ralf |