------- Comment #5 from joseph at codesourcery dot com 2009-06-15 13:06 ------- Subject: Re: Option -I and POSIX conformance (c99 utility)
On Mon, 15 Jun 2009, vincent at vinc17 dot org wrote: > ------- Comment #4 from vincent at vinc17 dot org 2009-06-15 11:59 ------- > (In reply to comment #3) > > If you have modified the implementation (by putting headers/libraries in > > standard directories where those headers/libraries were not provided by > > the implementation in those versions in those directories, for example), > > you are very definitely outside the scope of POSIX. > > I'm not sure I understand what you mean. But the existing practice is that > additional headers/libraries (i.e. not those defined by the C standard) > provided by the vendor are stored under /usr/{include,lib}. And I don't think > this goes against POSIX. Concerning /usr/local, the FHS says: > > The /usr/local hierarchy is for use by the system administrator when > installing software locally. > > So, it should be safe to add libraries there. And again, this is the existing > practice. It is not, however, safe to add libraries there that in any way conflict with the libraries provided by the system in /usr (such as different versions of the same libraries). A POSIX-conforming system should have a POSIX conformance document that explains the circumstances under which the claims of POSIX conformance are made. Those circumstances will include restrictions on any modification of system directories, such as limits on the contents of files in /etc for the system to be conforming and limits on what may go in /usr/local if some POSIX applications search that directory by default. This document is nothing to do with GCC on its own; it has to be provided by the system integrator and describes properties of the whole system. If the document for the POSIX system you are using is inadequate, you should raise that with the system integrator (and if necessary with whoever certified conformance). And if POSIX does not render undefined options that have the effect of changing internal configuration details of applications, where those details have to be in a particular form for conformance (for example, conformance requiring header and library directories in a particular order), this is a bug in POSIX. -I or -L options pointing to any of an implementation-defined set of system directories, or any directory with duplicates of headers or libraries in system directories, should be undefined behavior. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40442