public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Cross-compiling ....
@ 2002-08-19 11:25 Buddy Lott
  2002-08-19 15:52 ` Cross-compiling Andrea Bocci
  0 siblings, 1 reply; 3+ messages in thread
From: Buddy Lott @ 2002-08-19 11:25 UTC (permalink / raw)
  To: gcc-help


[-- Attachment #1.1: Type: text/plain, Size: 2969 bytes --]

At the risk of being flamed out of existence ..

 

I am trying to build a cross-compiler that goes from a pc running
windows 2000 to an embedded Motorola 68360 processor. I have failed in
so many ways so far that I am about ready to give up.

 

Here are things I have tried:

 

1)       Dos configure/compile .. Did not work . this was expected.

2)       Dos compile using bash shell.. Did not work (out of memory)
this was expected

3)       Cygwin compile . DID not work . this was NOT expected .. I hit
several problems ..

a.       Most recently compile errors with function.c

 

gcc -c -DCROSS_COMPILE -DIN_GCC   -DDONT_HAVE_STDIO -DDONT_HAVE_SETJMP
-Dinhibi

t_libc  -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes

 -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I.
-I./. -I

./config -I./../include function.c -o function.o

function.c: In function `instantiate_decls':

function.c:3581: warning: comparison between signed and unsigned

function.c: In function `expand_function_end':

function.c:6982: `USE_RETURN_INSN' undeclared (first use in this
function)

function.c:6982: (Each undeclared identifier is reported only once

function.c:6982: for each function it appears in.)

function.c: In function `thread_prologue_and_epilogue_insns':

function.c:7225: `USE_RETURN_INSN' undeclared (first use in this
function)

make[1]: *** [function.o] Error 1

make[1]: Leaving directory `/home/Administrator/gcc-3.0.4/gcc'

make: *** [all-gcc] Error 2

 

b.       Precious bad option

 

/home/Administrator/gcc-3.0.4/gcc/xgcc
-B/home/Administrator/gcc-3.0.4/gcc/ -B/u

sr/local/m68k-elf/bin/ -B/usr/local/m68k-elf/lib/ -isystem
/usr/local/m68k-elf/i

nclude -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings
-Wstrict-prototypes

-Wmissing-prototypes -isystem ./include  -I. -I. -I. -I./. -I./config
-I./../inc

lude  -g0 \

  -finhibit-size-directive -fno-inline-functions \

  -fno-exceptions  -Dinhibit_libc \

  -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o

as: unrecognized option `-mc68020'

make[1]: *** [crtbegin.o] Error 1

make[1]: Leaving directory `/home/Administrator/gcc-3.0.4/gcc'

make: *** [all-gcc] Error 2

 

 

 

I have tried various "targets" (m68k-coff, m68k-elf, mcore-elf).  I am
working on getting a linux box going to see if I have any better luck
there  (I don't expect to).

 

So here are my questions/goals:

 

1)       Where is some good upto date documentation (either online or in
book) on how to use the Gnu compiler suite in an embedded system or at
least as a cross-compiler? I need to be able to build the compiler
(hopefully for many different targets) and do all the other fun things
like specifying the memory layout.

2)       If there is not an answer to #1, then can anyone tell me how to
solve the problems I am having above. I have looked (probably in all the
wrong places) and tried to find the information I need to no avail. 

 

Thanks,

 

 

 

Buddy Lott

 


[-- Attachment #1.2: Type: text/html, Size: 14231 bytes --]

[-- Attachment #2: Buddy Lott.vcf --]
[-- Type: text/x-vcard, Size: 129 bytes --]

BEGIN:VCARD
VERSION:2.1
N:Lott;Buddy
FN:Buddy Lott
EMAIL;PREF;INTERNET:BuddyLott@kmc-controls.com
REV:20020613T135616Z
END:VCARD

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cross-compiling ....
  2002-08-19 11:25 Cross-compiling Buddy Lott
@ 2002-08-19 15:52 ` Andrea Bocci
  2002-08-21  7:18   ` Cross-compiling Buddy Lott
  0 siblings, 1 reply; 3+ messages in thread
From: Andrea Bocci @ 2002-08-19 15:52 UTC (permalink / raw)
  To: Buddy Lott, gcc-help


> I am trying to build a cross-compiler that goes from a pc running
> windows 2000 to an embedded Motorola 68360 processor. I have failed in
> so many ways so far that I am about ready to give up.

From the mailing list, cross compiling is the most complex thing people encounter when
using GCC. At least,  the one a lot of people complain about as being badly documented
and hard to make work.

So, my advices are 0.) Try again with GCC 3.2and the latest binutils and newlib (guess
you won't used glibc for an ambedded target...) 1.) Read all the latest ML messages
regarding cross-compiling with GCC. 2.) Have a good search on Google for something
like   GCC "cross compiler" coìnfiguration howto 3.) If everthing else fail, and you're
really interested in making things work, mail me. I'm on holiday right now, and I'll be
home by the first days of September. Then, one of the things in my todolist is to put up a
good GCC working base, so I'll bebuilding it as a crosscompiler from cygwin for quite
some architectures (linux to test it, the hpux, solaris and someembedded chip). If I
menage it, I'll send a (skeleton of) documentation to the ML, and if the thing gets good,
maybe it'll end online some where.

I guess that feedback from others trying to do this will be invaluable, so, stay tuned :-)

I know this won't help much right now, but maybe you'll keep on trying :-)
fwyzard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Cross-compiling ....
  2002-08-19 15:52 ` Cross-compiling Andrea Bocci
@ 2002-08-21  7:18   ` Buddy Lott
  0 siblings, 0 replies; 3+ messages in thread
From: Buddy Lott @ 2002-08-21  7:18 UTC (permalink / raw)
  To: gcc-help


I think I made it past my problems (except for a minor 1).

Here is what I did (after cleaning up from my previous attempts):

 

1)       Downloaded and installed cygwin
2)       Downloaded the binutils-2.13.tar  gcc-3.0.4.tar
newlib-1.9.0.tar.
3)       Mkdir m68k-elf && cd m68k-elf
4)       Untarred each file into m68k-elf
5)       Mkdir build
6)       Cd build
7)       ../binutils-2.13/configure -target=m68k-elf
8)       make all install
9)       ../gcc-3.0.4/configure -target=mk68k-elf -without-headers
-with-newlib
10)   make all-gcc install-gcc
11)   ../newlib-1.9.0/configure -target=mk68k-elf
12)   make all install
13)   ../gcc-3.0.4/configure -target=m68k-elf -with-newlib
14)   make all install

 
The only real difference (from previous attempts) was adding
"-with-newlib" to step 13.  I don't remember seeing this anywhere I
looked.

I repeated the process with -target=m69k-coff and had mostly the same
success. The only error was with the install take on step 14. It
complained about files in /usr/local/bin/#inst.xxxx# (xxxx is some
number) not being found it. This was because the file actually had a
.exe extension added on it. Then the problem went mysteriously away. I
still have to test to make sure that the compiler works... but at least
I have the compiler.

I did the same series of steps (minus the "-with-newlib") on RedHat
Linux 7.3 and it worked there perfectly.


> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]
On
> Behalf Of Andrea Bocci
> Sent: Monday, August 19, 2002 5:50 PM
> To: Buddy Lott; gcc-help@gcc.gnu.org
> Subject: Re: Cross-compiling ....
> 
> 
> > I am trying to build a cross-compiler that goes from a pc running
> > windows 2000 to an embedded Motorola 68360 processor. I have failed
in
> > so many ways so far that I am about ready to give up.
> 
> From the mailing list, cross compiling is the most complex thing
people
> encounter when
> using GCC. At least,  the one a lot of people complain about as being
> badly documented
> and hard to make work.
> 
> So, my advices are 0.) Try again with GCC 3.2and the latest binutils
and
> newlib (guess
> you won't used glibc for an ambedded target...) 1.) Read all the
latest ML
> messages
> regarding cross-compiling with GCC. 2.) Have a good search on Google
for
> something
> like   GCC "cross compiler" coìnfiguration howto 3.) If everthing else
> fail, and you're
> really interested in making things work, mail me. I'm on holiday right
> now, and I'll be
> home by the first days of September. Then, one of the things in my
> todolist is to put up a
> good GCC working base, so I'll bebuilding it as a crosscompiler from
> cygwin for quite
> some architectures (linux to test it, the hpux, solaris and
someembedded
> chip). If I
> menage it, I'll send a (skeleton of) documentation to the ML, and if
the
> thing gets good,
> maybe it'll end online some where.
> 
> I guess that feedback from others trying to do this will be
invaluable,
> so, stay tuned :-)
> 
> I know this won't help much right now, but maybe you'll keep on trying
:-)
> fwyzard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-21 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19 11:25 Cross-compiling Buddy Lott
2002-08-19 15:52 ` Cross-compiling Andrea Bocci
2002-08-21  7:18   ` Cross-compiling Buddy Lott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).