sh4-cross-compiling-gcc-3.0.2 build fails during assembly
Steven Mueller
diffusor@ugcs.caltech.edu
Mon Jan 14 17:09:00 GMT 2002
Hello all,
Recently I've been having trouble compiling gcc 3.0.2 targeting the
Hitachi Super Solution engine sh4. The script I've been using to
automate the build, developed by my colleague Dan Kegel and me, is
available online at
http://www.ugcs.caltech.edu/~diffusor/build-sh4-gcc3.sh
It uses the binutils in Montavista's HardHat 2.0 sh4 cross development
kit and installs itself into that hierarchy.
We'd been using this script successfully through a week or two ago,
but now it fails when it reaches the first cross-assembly step.
Perhaps it's using the wrong as for some reason? If someone could
shed some light on debugging this weirdness, such as how and where the
cross-assembler location is determined and how we might be able to
find out which assembler it's using, that'd be great. Copy-pasting
the offending line from the log and adding the -v and the -save-temps
options was not as enlightening as I would have liked.
The build machine is a PIII running the debian testing/Woody
distribution with gcc package version 2.95.4-6. The build also fails
under 2.95.4-8.
The messages leading up to the failure are as follows:
echo '#define FLOAT' > fp-bit.c
echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
echo '#endif' >> fp-bit.c
cat ../../gcc-sh-linux-3.0.2/gcc/config/fp-bit.c >> fp-bit.c
echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
echo '#endif' >> dp-bit.c
cat ../../gcc-sh-linux-3.0.2/gcc/config/fp-bit.c >> dp-bit.c
/home/dank/sh4-gcc/gcc-build/gcc/xgcc -B/home/dank/sh4-gcc/gcc-build/gcc/ -B/opt/hardhat/devkit/sh/sh4_le/sh4-linux/bin/ -B/opt/hardhat/devkit/sh/sh4_le/sh4-linux/lib/ -isystem /opt/hardhat/devkit/sh/sh4_le/sh4-linux/include -DCROSS_COMPILE -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I../../gcc-sh-linux-3.0.2/gcc -I../../gcc-sh-linux-3.0.2/gcc/. -I../../gcc-sh-linux-3.0.2/gcc/config -I../../gcc-sh-linux-3.0.2/gcc/../include -g0 \
-finhibit-size-directive -fno-inline-functions \
-fno-exceptions \
-c ../../gcc-sh-linux-3.0.2/gcc/crtstuff.c -DCRT_BEGIN -o crtbegin.o
/tmp/ccJfUj2U.s: Assembler messages:
/tmp/ccJfUj2U.s:2: Error: unknown pseudo-op: `.little'
/tmp/ccJfUj2U.s:16: Error: alignment not a power of 2
/tmp/ccJfUj2U.s:19: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:20: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:21: Error: suffix or operands invalid for `add'
/tmp/ccJfUj2U.s:22: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:23: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:24: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:25: Error: no such instruction: `tst r1,r1'
/tmp/ccJfUj2U.s:26: Error: suffix or operands invalid for `bt'
/tmp/ccJfUj2U.s:27: Error: no such instruction: `bra .L3'
/tmp/ccJfUj2U.s:29: Error: alignment not a power of 2
/tmp/ccJfUj2U.s:33: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:34: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:35: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:36: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:37: Error: no such instruction: `tst r1,r1'
/tmp/ccJfUj2U.s:38: Error: no such instruction: `bf .L7'
/tmp/ccJfUj2U.s:39: Error: no such instruction: `bra .L6'
/tmp/ccJfUj2U.s:41: Error: alignment not a power of 2
/tmp/ccJfUj2U.s:43: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:44: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:45: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:46: Error: suffix or operands invalid for `add'
/tmp/ccJfUj2U.s:47: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:48: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:49: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:50: Error: no such instruction: `jsr @r1'
/tmp/ccJfUj2U.s:52: Error: no such instruction: `bra .L5'
/tmp/ccJfUj2U.s:54: Error: alignment not a power of 2
/tmp/ccJfUj2U.s:56: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:57: Error: no such instruction: `tst r1,r1'
/tmp/ccJfUj2U.s:58: Error: suffix or operands invalid for `bt'
/tmp/ccJfUj2U.s:59: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:60: Error: no such instruction: `jsr @r1'
/tmp/ccJfUj2U.s:63: Error: suffix or operands invalid for `mov'
/tmp/ccJfUj2U.s:64: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:65: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:67: Error: suffix or operands invalid for `add'
/tmp/ccJfUj2U.s:68: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:69: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:70: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:71: Error: no such instruction: `rts '
/tmp/ccJfUj2U.s:83: Error: alignment not a power of 2
/tmp/ccJfUj2U.s:86: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:87: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:88: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:90: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:91: Error: no such instruction: `mova 2f,r0'
/tmp/ccJfUj2U.s:92: Error: no such instruction: `braf r1'
/tmp/ccJfUj2U.s:93: Error: too many memory references for `lds'
/tmp/ccJfUj2U.s:98: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:99: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:100: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:101: Error: no such instruction: `rts '
/tmp/ccJfUj2U.s:105: Error: alignment not a power of 2
/tmp/ccJfUj2U.s:108: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:109: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:110: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:111: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:112: Error: no such instruction: `tst r1,r1'
/tmp/ccJfUj2U.s:113: Error: suffix or operands invalid for `bt'
/tmp/ccJfUj2U.s:114: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:115: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:116: Error: no such instruction: `jsr @r1'
/tmp/ccJfUj2U.s:119: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:120: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:121: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:122: Error: no such instruction: `rts '
/tmp/ccJfUj2U.s:132: Error: alignment not a power of 2
/tmp/ccJfUj2U.s:135: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:136: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:137: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:139: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:140: Error: no such instruction: `mova 2f,r0'
/tmp/ccJfUj2U.s:141: Error: no such instruction: `braf r1'
/tmp/ccJfUj2U.s:142: Error: too many memory references for `lds'
/tmp/ccJfUj2U.s:147: Error: too many memory references for `mov'
/tmp/ccJfUj2U.s:148: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:149: Error: invalid character '.' in mnemonic
/tmp/ccJfUj2U.s:150: Error: no such instruction: `rts '
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/home/dank/sh4-gcc/gcc-build/gcc'
make: *** [all-gcc] Error 2
A quick search on Google indicates these types of errors are pretty
common for a mismatching assembler architecture...
Thanks,
Steve
--
Steven Mueller
diffusor@ugcs.caltech.edu
More information about the Gcc-help
mailing list