home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / gcc / help / 1757 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!mips!darwin.sura.net!wupost!emory!utkcs2!utkux1.utk.edu!laser1.engr.utk.edu!rich
  2. From: rich@laser1.engr.utk.edu (Stevie-weave)
  3. Newsgroups: gnu.gcc.help
  4. Subject: Re: installing gcc linker (ld)
  5. Message-ID: <1992Jul22.170054.23775@utkux1.utk.edu>
  6. Date: 22 Jul 92 17:00:54 GMT
  7. References: meissner@osf.ORG <9207221431.AA03131@tiktok.osf.org>
  8. Sender: usenet@utkux1.utk.edu (USENET News System)
  9. Distribution: gnu
  10. Organization: University of Tennessee ECE dept.
  11. Lines: 43
  12.  
  13. In article <9207221431.AA03131@tiktok.osf.org>, meissner@osf.ORG writes:
  14. |> | 
  15. |> |    +laser3$ ld -d -r -Bstatic -o test2.o test.o
  16. |> |    +ld: test.o: wrong machine type
  17. |> |    +collect: /usr/bin/ld returned 4 exit status
  18. |> | 
  19. |> |    However, your stated command line seems to indicate that you're
  20. |> |    using the sparc 'ld' rather than
  21. |> |    '/usr/local/lib/gcc-lib/sun3/2.2.2/ld' (or something to that
  22. |> |    effect).
  23. |> | 
  24. |> | Actually, what's probably happening here is that collect is being
  25. |> | installed for the cross-compiler, and collect has buried in it some
  26. |> | hardcoded pathnames for where to find the system linker.  
  27. |> | 
  28. |> | You need to remove the ld in $(libsubdir)/ld and replace that with the
  29. |> | cross-linker.  The linker in the binutils should work just find for a
  30. |> | cross-68k environment.
  31. |> 
  32. |> Or alternatively, put the real linker as $(libsubdir)/real-ld, and
  33. |> then you can happily do cross development of GCC and G++ files.  If
  34. |> your system needs collect, and you replace 'ld' with a real linker,
  35. |> you will not be able to use static constructors and destructors in
  36. |> G++.
  37. |> 
  38. |> --
  39. |> Michael Meissner    email: meissner@osf.org        phone: 617-621-8861
  40. |> Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
  41. |> 
  42. |> You are in a twisty little passage of standards, all conflicting.
  43. O.K. I got it now. According to the install stuff with gcc-2.2.2, if you
  44. want to run the cross-loader and not the loader as a driver to the sparc
  45. stuff, you configure with --use-gnu-ld (or something like that). However,
  46. I get the same errors. Therefore, I built with the above option, installed
  47. the gnu cross loader found on sprite.berkely.edu (I couldn't figure out
  48. how to build ld out of binutils as a cross-loader) and it now works. The
  49. only thing that bothers me now is that the loader complains about the
  50. .so revision of libc.so..... when I load with -d -r options (not resolving
  51. globals, etc) because the VxWorks stuff resolves at load time. Does anybody
  52. know why?
  53.     Thanks for your help.
  54.  
  55. sjr
  56.