This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Trying to figure out what host to use


Hi Kai (and all),

Thank you for responding to my entreaties!

I have actually made some progress since my original post, but have now hit
a problem which is baffling me. Perhaps the collective wisdom of this group
will give me some ideas...

 
> The default target for m68k-coff is m68020/m68881 but the mcpu32/msoft-float
> (or just mcpu32) specific libs should be produced too. You just must remember
> to use the '-mcpu32' or '-m68332' when compiling and linking. If modifying the
> config files, it is possible to set the '-mcpu32' to be the default, but there
> isn't yet a 'mcpu32-coff' target for this, neither a 'm5200-coff' for Coldfire
> as the default... If you think that the CPU32 core should be the default, then
> the target is wrong and you should add a new target, otherwise it is right...

So, if I understand what you're saying, using the target of m68k-coff is
correct for the 68332. Assuming I actually get a working gcc-cross, when I
compile a source program (e.g., hello.c), I need to use the -m68332 flag
when compiling and linking. Is that correct? (Or are you saying I have to do
something else besides *just* build the gcc-cross for the m68k-coff
target???).

> Your current GCC and the config files for it will reveal this...
> 

Since my original post, I was able to find the (supposedly) original files
for building gcc 2.8.1. So I started with those.

I created a directory (build-gcc) and from that directory ran the configure
program in the gcc directory.  This worked.

I then ran "make all" and with one exception related to a define necessary
for cccp.c, the make ran until it bombed with the following message:

cp ../gnu-2.8.1/gcc/config/m68k/lb1sf68.asm libgcc1.S
for name in _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _double _float
_floatex _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2
_ledf2 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2; \
do \
  echo ${name}; \
  ./xgcc -B./ -O2  -DCROSS_COMPILE -DIN_GCC    -g -I./include   -g1
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fexceptions -I. -I../gnu-2.8.1/gcc
-I../gnu-2.8.1/gcc/config -c -DL${name} libgcc1.S; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  mv libgcc1.o ${name}.o; \
  /volume/FFS_500/bar/m68k-coff/bin/ar rc tmplibgcc1.a ${name}.o; \
  rm -f ${name}.o; \
done
_mulsi3
Assembler messages:
Error: invalid switch -mc68020
make: *** [libgcc1-asm.a] Error 1

It looks to me like the newly created xgcc does not recognize its default
switch (mc68020). I tried compiling a simple C program (hello.c) with xgcc
and got the same error message. If I try to compile with:

xgcc -m68000 -o hello hello.c

I get:
Assembler messages:
Error: invalid switch -m68000

So, it seems that no switches are being recognized.

At this point, I don't quite know where to look.

Any ideas?

I guess my next step is to compile gcc 2.8.1 with the current computer as
the target to see if I can get a compile that works...

Thanks again for all your help!


Here, btw, are some results you originally requested:

gcc -dumpversion
2.8.1
gcc -dumpmachine
powerpc-apple-machten4

gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-apple-machten4/2.8.1/specs
gcc version 2.8.1 


And for the compiled cross-gcc:

xgcc -dumpmachine
m68k-unknown-coff

xgcc -v
Using builtin specs.
gcc version 2.8.1 





------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]