Assembler errors with --host=m68k-motorola-sysv3

Beere, Chris Chris.Beere@cwcom.co.uk
Mon Dec 13 03:38:00 GMT 1999


Hello,
         I have been trying to upgrade our gnu C compiler from 2.4.5 to
2.95.2 and have been having a lot of problems. I originally had an internal
compiler error and reported this too you, subject line:-

genattr: Internal compiler error in `read_rtx', at
../../src/gcc-2.95.2/gcc/rtl.c:888

Since then I have installed an old compiler 2.7.2.3 and tried the compile of
2.95.2 again. It failed immeditely in the assembler, which is gas from
binutils 2.9.1 with the following errors:-

(hilda)# make bootstrap
make[1]: Entering directory `/users2/gnu/gcc/obj/libiberty'
if [ x"no" = xyes ] && [ ! -d pic ]; then \
  mkdir pic; \
else true; fi
touch stamp-picdir
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in /bin/sh ./config.status
creating config.h
test x"no" != xyes || \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I.
-I../../src/gcc-2.95.2/libiberty/../include
  ../../src/gcc-2.95.2/libiberty/argv.c -o pic/argv.o
gcc -c -DHAVE_CONFIG_H -g -O2 -I.
-I../../src/gcc-2.95.2/libiberty/../include  .
./../src/gcc-2.95.2/libiberty/argv.c
/usr/tmp/cca06644.s: Assembler messages:
/usr/tmp/cca06644.s:196: Error: operands mismatch -- statement `cmp.b
%d0,&32' i
gnored
/usr/tmp/cca06644.s:198: Error: operands mismatch -- statement `cmp.b
%d0,&9' ig
nored
/usr/tmp/cca06644.s:255: Error: operands mismatch -- statement `cmp.b
%d0,&32' i
gnored
/usr/tmp/cca06644.s:257: Error: operands mismatch -- statement `cmp.b
%d0,&9' ig
nored
/usr/tmp/cca06644.s:279: Error: operands mismatch -- statement `cmp.b
%d0,&92' i
gnored
/usr/tmp/cca06644.s:290: Error: operands mismatch -- statement `cmp.b
%d0,&39' i
gnored
/usr/tmp/cca06644.s:301: Error: operands mismatch -- statement `cmp.b
%d0,&34' i
gnored
/usr/tmp/cca06644.s:309: Error: operands mismatch -- statement `cmp.b
%d0,&39' i
gnored
/usr/tmp/cca06644.s:317: Error: operands mismatch -- statement `cmp.b
%d0,&34' i
gnored
/usr/tmp/cca06644.s:363: Error: operands mismatch -- statement `cmp.b
%d0,&32' i
gnored
/usr/tmp/cca06644.s:365: Error: operands mismatch -- statement `cmp.b
%d0,&9' ig
nored
make[1]: *** [argv.o] Error 1
make[1]: Leaving directory `/users2/gnu/gcc/obj/libiberty'
make: *** [all-libiberty] Error 2

which has the operands the wrong way round for gas
cmp.b %d0,&34  should be cmp.b &34,%d0

I f I force it to use the native assembler /bin/as the build progresses
smoothly until:-



gcc  -DIN_GCC     -g `if [ xcccp.o = xcombine.o -a "gcc" = "cc" ]; then echo
-Wa
,-j; fi` -DHAVE_CONFIG_H   -DUSE_GAS -DUSE_GLD -I.
-I../../src/gcc-2.95.2/gcc -I
../../src/gcc-2.95.2/gcc/config -I../../src/gcc-2.95.2/gcc/../include \
 
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-motorola-sysv3/2.95.2/includ
e\
" \
 
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-motorola-sysv3/2.95.2/
..
/../../..`echo /usr/local | sed -e 's|^/usr/local||' -e
's|/[^/]*|/..|g'`/includ
e/g++-3\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
 
-DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-motorola-sysv3/2.95.2/../.
./
../../m68k-motorola-sysv3/sys-include\" \
 
-DTOOL_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-motorola-sysv3/2.95.2/../..
/.
./../m68k-motorola-sysv3/include\" \
  -c `echo ../../src/gcc-2.95.2/gcc/cccp.c | sed 's,^\./,,'`
Assembler: cccp.c
 aline 30701(cline 10167): Warning: Table overflow: some optimizations lost
(SDI
s)
 aline 30970(cline 4847): Warning: value 0xfffeda68 underflows 16 bits
 aline 30990(cline 4853): Fatal: displacement larger than .b
make[2]: *** [cccp.o] Error 1
make[2]: Leaving directory `/users2/gnu/gcc/obj/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/users2/gnu/gcc/obj/gcc'
make: *** [bootstrap] Error 2

Please note in the first build the compilation line does not contain any
references to gas but in the second -DUSE_GAS is used to tell it to use GAS
format.
My configure command was "configure --host=m68k-motorola-sysv3 --with-gnu-as
--with-gnu-ld"

It seems to me as though --with-gnu-as is not having the desired effect?
What could be wrong? Is there a magic environment variable I have not set
up? I have set up "CC=gcc;export CC". I need to be able to use gas as the
native assembler can't cope with cccp.c.

Any ideas as to why gcc is not taking any notice of --with-gnu-as? Do the
the older compilers need a different option like --with-gas?

regards

Chris Beere

Phone: +44 (0) 1923 435817
Fax:     +44 (0) 1923 435370
Email:   chris.beere@cwcom.co.uk




More information about the Gcc-bugs mailing list