home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25659 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.3 KB  |  31 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!enterpoop.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jfc
  3. From: jfc@athena.mit.edu (John F Carr)
  4. Subject: Re: gcc 2.3.3 problem
  5. Message-ID: <1993Jan28.042809.12341@athena.mit.edu>
  6. Sender: news@athena.mit.edu (News system)
  7. Nntp-Posting-Host: achates.mit.edu
  8. Organization: Massachusetts Institute of Technology
  9. References: <1993Jan25.144702.4734@hp9000.csc.cuhk.hk> <SCT.93Jan26194220@ascrib.dcs.ed.ac.uk>
  10. Date: Thu, 28 Jan 1993 04:28:09 GMT
  11. Lines: 18
  12.  
  13. In article <SCT.93Jan26194220@ascrib.dcs.ed.ac.uk>
  14.     sct@dcs.ed.ac.uk (Stephen Tweedie) writes:
  15.  
  16. >However, it uses the position of an option on the command line to
  17. >determine which options to pass to which program.  Linking is done
  18. >after compilation, so linker options should come after compiler
  19. >options and arguments on the gcc command line.
  20.  
  21. This is not true.  Linker options can appear anywhere on the command line
  22. (.o files are also linker options).  The compiler preserves the order of
  23. linker options.  Most linkers are sensitive to the order of options.  For
  24. object files (.o) the order isn't usually important, but for libraries it
  25. is.  A library must follow the object file that depends on it.
  26.  
  27. The only system I know of that does not behave this way is AIX version 3.
  28.  
  29. --
  30.     John Carr (jfc@athena.mit.edu)
  31.