home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!network.ucsd.edu!sdcc12!sdcc3!jclark
- From: jclark@sdcc3.ucsd.edu (John Clark)
- Newsgroups: gnu.gcc.help
- Subject: Re: installing gcc linker (ld)
- Message-ID: <35900@sdcc12.ucsd.edu>
- Date: 21 Jul 92 18:55:22 GMT
- References: <9207162210.AA26434@cod.nosc.mil> <1992Jul18.190052.11346@utkux1.utk.edu>
- Sender: news@sdcc12.ucsd.edu
- Distribution: gnu
- Organization: University of California, San Diego
- Lines: 41
- Nntp-Posting-Host: sdcc3.ucsd.edu
-
- In article <1992Jul18.190052.11346@utkux1.utk.edu> rich@laser1.engr.utk.edu (Stevie-weave) writes:
- +
- +In a similar and related issue, I'm building gcc-2.2.2 as a x-compiler for
- +VxWorks for a 68030 processor with the compiler host a Sparc2. Some other
- +stuff we have needs a cross loader, but the ld that is in the
- +sun3/2.2.2/ set doesn't work. It dies with
- +
- +laser3$ ld -d -r -Bstatic -o test2.o test.o
- +ld: test.o: wrong machine type
- +collect: /usr/bin/ld returned 4 exit status
-
- The complete sparc to mc68030 environment requires that you build a
- X-ld program supplied in the 'binutils' package, I think the current
- released version is 1.94 or so. The 'ld' function built will take
- the 68k gas output and create an executable.
-
- If you've already compiled the GNU ld, and got the above error, then
- you may not have 'configured' the build correctly. You should have
- configured with a line something to the effect of:
-
- configure -host=sun4 -target=sun3
-
- (may be off modulo some dashes, but there is doc in the bintuils
- directory with examples).
-
- However, your stated command line seems to indicate that you're
- using the sparc 'ld' rather than
- '/usr/local/lib/gcc-lib/sun3/2.2.2/ld' (or something to that
- effect).
-
-
- As a practice, I've set up the m68k ld to be in /usr/local/bin/ld68k
- which may be linked to the ugly path list above. Similarly, gcc68k
- and gas68k would be linked to the appropriate m68k executables. This
- prevents the inadvertent use of the host's native tools and the
- resulting 'wrong machine....' error messages.
-
- --
-
- John Clark
- jclark@ucsd.edu
-