This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: order of switches
On Aug 12, 1999, Igor Markov <imarkov@cs.ucla.edu> wrote:
>> the order of the switches most definitely matters for include file
>> directories and libraries.
> yes, that relates to the order, but that *does* seem trivial
> (esp. that I am using the Makefiles which work with SunCC)
> In one instance I had to move -l after the .o file
> so that gcc does not silently ignore -l
It doesn't. It passes it to the linker, that opens the library but
figures out it doesn't need any symbol from it. Then it gets to the
.o files. Maybe SunCC reorders flags, or some implicit object file it
links in before any library imports the symbols you need from it.
> In another instance I was bitten by both -Ixxx and -I being
> legal (I defined STL="" because g++ has a good STL inside)
`-I dir' is legal because some compilers accept it, SunCC included.
You're the one causing the difference, by setting STL="", misled by
whoever designed the Makefile in a way that makes it hard for one to
disable the flag to search for STL. You could probably make it work
with STL="unneeded"
>> > I just grep'ed man g++ for "order" and it there were no matches.
>> The man pages are very minimal guides to the option flags. The real
>> documentation of GCC is in the texinfo files.
> I get an impression of that this is some kind of conspiracy (gee !)
> .. not sure, but, perhaps, to cause people to buy support ?
texinfo has always been the documentation format recommended for GNU
projects, and GCC's man-page points to the info files as the official
documentation. texinfo is *much* easier to write than troff, and info
files are as easy to read as man-pages (or easier, if you're a convert
:-). You just need the proper tool (`info' or `emacs'). Or, if you
prefer, you can use the printed version, generated from the texinfo
files with `texinfo'.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them