Article View: gnu.gcc.help
Article #51993Re: info for cross-compilation using gcc wanted
From: Gerd Truschinski
Date: Tue, 09 Feb 1993 20:20
Date: Tue, 09 Feb 1993 20:20
77 lines
3595 bytes
3595 bytes
In article <9304018.27245@mulga.cs.mu.OZ.AU>, vip@mullian.ee.mu.oz.au (vincent pang) writes:
|>
|> Hi there,
|>
|> I am trying to build a cross-compiler using a host (88k-DG-DGUX) and
|> a target of m68k. Reading the gcc-2.3.3 info notes on building and installing
|> a cross-compiler tells me that I may or may not require a file 'libgcc1.a'
|> I would like to know whether this file is necessary and if so, would it
|> possible to obtain a copy of it?
|>
|> I am relatively inexperienced in the art of building cross-compilers,
|> (i.e. never built one in my life) so I would greatly appreciate any help
|> or documentation that may be available.
|>
|> Please reply to me via e-mail and thanx in advance.
|>
|> Regards,
|>
|> Vincent Pang
|>
|> vip@lochard.com.au
|>
I have a gcc-2.3.2 running on my 386bsd-system. It is generating code for
the mc68020/30/40.
You, i.e. the compiler, needs libgcc.a, with is a libgcc1.a combined with a
libgcc2.a. There is a line in the INSTALL manual how to build this.
> To do this, specify `LIBGCC1=libgcc1.a OLDCC=./xgcc' when building
> the compiler.
>
To do so you need a cross-assembler and a cross-linker. Take the binutils and gas
(9.Feb.1993)
binutils-2.0.tar.Z (try to get a version from this year)
gas-1.93.tar.Z (the 1.92.3 didn't know the '30 and up allright)
OK, now you run configure. I told configure, that I have a 'sun3' as target.
( there must be a better way).
> configure --host=i386--bsd --target=sun3 --prefix=/usr/gt/local
> gmake LANGUAGES=c LIBGCC1=libgcc1.a OLDCC=./xgcc
It may be that your 'as' and your 'ld' are not at the right place - put links
to the right place. If you are building the libgcc1.a and there is the error
about a wrong switch 'm' 'c' '6' '8' '0' .... the you are using your home-as.
Then the cc is complaining about some missing #includes, if you have time,
solve the error or do it like me, comment the lines out.
when the gmake dies type:
> gmake LANGUAGES=c LIBGCC1=libgcc1.a OLDCC=./xgcc install
Now you have something to play with.
OH, wait at some place the gmake is dying with .... specs ....
type:
> ./xgcc -dumpspecs > specs
In this specs file there are information, which libs crt0.o ... gcc need.
edit this file, if there are things in you don't have ( mcrt0.o lib??? ).
May be the best idea is that someone with knowledge and english writing
capabilities build a FAQ-how-to-build-a-cross-compiler-including-how-to-
build-a-g++-cross-compiler-starting-with-a-new-lib
Hope this helps a little.
/gT/
--
Gerd Truschinski | INTERNET: gt@first.gmd.de
c/o GMD-First Berlin |
O-1199 Berlin-Adlershof | TEL: +49 30 6704 2662
Rudower Chausee 5 (13.7) | FAX: +49 30 6704 5088
Technical Details
Message-ID:
<3017@bigfoot.first.gmd.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!gmdtub!prosun!gtReferences:
<9304018.27245@mulga.cs.mu.OZ.AU>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,55bf4fcd519dc9a7 X-Google-Attributes: gid11318c,public X-Google-Thread: feb3e,55bf4fcd519dc9a7 X-Google-Attributes: gidfeb3e,public X-Google-ArrivalTime: 1993-02-09 12:20:56 PST Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!gmdtub!prosun!gt From: gt@prosun.first.gmd.de (Gerd Truschinski) Newsgroups: gnu.gcc.help,comp.sys.m68k Subject: Re: info for cross-compilation using gcc wanted Message-ID: <3017@bigfoot.first.gmd.de> Date: 9 Feb 93 20:20:56 GMT References: <9304018.27245@mulga.cs.mu.OZ.AU> Sender: news@bigfoot.first.gmd.de Followup-To: gnu.gcc.help Organization: GMD Berlin (FIRST) Lines: 77