From: jfc@athena.mit.edu (John F Carr) Subject: Re: gcc 2.3.3 problem Date: Thu, 28 Jan 1993 04:28:09 GMT
In article <SCT.93Jan26194220@ascrib.dcs.ed.ac.uk>
sct@dcs.ed.ac.uk (Stephen Tweedie) writes:
>However, it uses the position of an option on the command line to
>determine which options to pass to which program. Linking is done
>after compilation, so linker options should come after compiler
>options and arguments on the gcc command line.
This is not true. Linker options can appear anywhere on the command line
(.o files are also linker options). The compiler preserves the order of
linker options. Most linkers are sensitive to the order of options. For
object files (.o) the order isn't usually important, but for libraries it
is. A library must follow the object file that depends on it.
The only system I know of that does not behave this way is AIX version 3.