xgcc and where to find as

Mark Palmerino mbp@csr-bos.com
Mon Feb 19 09:26:00 GMT 2001


Hi,

Again, I wish to thank everyone who is furthering my education, :-)

I now think that the problem I'm having (see below) has to do with how to
control where xgcc is getting the assembler (as).

Please look at the following:

************** Start here ***************
rm -f tmplibgcc1.a libgcc1.S
cp ../gnu-2.8.1/gcc/config/m68k/lb1sf68.asm libgcc1.S
for name in _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _double _float
_floatex _eqdf2 _ned
f2 _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${na
me} 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

*************** End here *******************

I think the assembler message about an invalid switch is coming from
the *host* 'as' and not the target 'as'.  I did build binutils for the
target m68k-coff and the following files exist:

m68k-coff-addr2line     m68k-coff-ld            m68k-coff-size
m68k-coff-ar            m68k-coff-nm            m68k-coff-strings
m68k-coff-as            m68k-coff-objcopy       m68k-coff-strip
m68k-coff-c++filt       m68k-coff-objdump
m68k-coff-gasp          m68k-coff-ranlib


in the /volume/FFS_500/bar/bin directory.  But, I don't think their being
used.  I come to that conclusion because of the following little test. I
created a small C program (called hello.c) and tried to compile it with:

xgcc -c hello.c

and I got the same error message about an invalid switch (btw, I'm in the
build-gcc directory).  When I link the m68k-coff-as file into the build-gcc
directory and call it 'as', the compile works.

So, I'm wondering how I should modify the Makefile, specifically the
following: 

.../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; \

so that the target versions of as (and presumably ln) are called? And, why
is this necessary, what did I do wrong with the use of the prefix?

Any help will be greatly appreciated!

Thanks,

Mark





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



More information about the crossgcc mailing list