home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / g / help / 1637 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  2.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!forney.berkeley.edu!jbuck
  2. From: jbuck@forney.berkeley.edu (Joe Buck)
  3. Newsgroups: gnu.g++.help
  4. Subject: Re: Gnu ld and collect
  5. Date: 6 Jan 1993 20:43:13 GMT
  6. Organization: U. C. Berkeley
  7. Lines: 36
  8. Message-ID: <1ifg91INNnfv@agate.berkeley.edu>
  9. References: <klamer.726308465@mi.el.utwente.nl>
  10. NNTP-Posting-Host: forney.berkeley.edu
  11.  
  12. In article <klamer.726308465@mi.el.utwente.nl> klamer@mi.el.utwente.nl (Klamer Schutte) writes:
  13. >I can see advantages in using both Gnu ld and collect for linking g++
  14. >programs. (See FAQ for what reasons.) Is it possible to have both
  15. >link systems available at the same time? (With a command line switch
  16. >for g++, for example?)
  17.  
  18. This can be made to work on some platforms (where collect and Gnu ld both
  19. work and accept the same format of object file).  Here is one very ugly
  20. way to do it that I got to work.
  21.  
  22. Let's say, for example, that you have 2.3.3 installed on a sparc.
  23. The compiler passes are then in (somewhere)/lib/gcc-lib/sparc/2.3.3
  24. (the makefile variable "libsubdir" refers to this directory).
  25.  
  26. As a first step, install gcc with "--with-gnu-ld" and put Gnu ld
  27. in the libsubdir directory.  Now, create a directory
  28. (somewhere)/lib/gcc-lib/sparc/2.3.3-collect.  Do a symbolic link
  29. to have everything in libsubdir appear in this directory as well.
  30. Install collect in this directory.
  31.  
  32. Now, you can use collect by saying "gcc -V 2.3.3-collect".  Furthermore,
  33. since only the link is different, you can omit the -V switch except
  34. when you are linking.
  35.  
  36. Warning: on the sparc, the Gnu linker won't call constructors properly for
  37. code compiled by a gcc binary that was configured without the
  38. --with-gnu-ld switch (the stabs directives that gld needs will be
  39. missing), but collect will not care if the stabs are present.  Since
  40. having the stabs present when they are unneeded is harmless (and the space
  41. required is tiny) I think they should always be generated on platforms
  42. with a.out-style objects.
  43.  
  44.  
  45.  
  46. --
  47. Joe Buck    jbuck@ohm.berkeley.edu
  48.