public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* sh4-cross-compiling-gcc-3.0.2 build fails during assembly
@ 2002-01-14 17:09 Steven Mueller
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Mueller @ 2002-01-14 17:09 UTC (permalink / raw)
  To: GCC Help list; +Cc: Dan Kegel

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

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

* RE: sh4-cross-compiling-gcc-3.0.2 build fails during assembly
       [not found] <616BE6A276E3714788D2AC35C40CD18D2C5960@whale.softwire.co.uk>
@ 2002-01-15  2:13 ` Rupert Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Rupert Wood @ 2002-01-15  2:13 UTC (permalink / raw)
  To: 'Steven Mueller'; +Cc: 'Dan Kegel', 'GCC Help list'

Steven Mueller wrote:

> A quick search on Google indicates these types of errors are pretty
> common for a mismatching assembler architecture...

In your script:

| (
| ln -s sh4el-hardhat-linux  sh4-linux
| cd bin
| ln -s sh_sh4_le-ar sh4-linux-ar
| ln -s sh_sh4_le-ld sh4-linux-ld
| ln -s sh_sh4_le-nm sh4-linux-nm
| ln -s sh_sh4_le-ranlib sh4-linux-ranlib
| ln -s sh_sh4_le-strip sh4-linux-strip
| )

you don't appear to set up sh4-linux-as. The new GCC, therefore, might
be using the host assembler.

You could try repeating the failing compile manually, adding '-v' to
check which assembler is being used.

Rup.

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

end of thread, other threads:[~2002-01-15 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-14 17:09 sh4-cross-compiling-gcc-3.0.2 build fails during assembly Steven Mueller
     [not found] <616BE6A276E3714788D2AC35C40CD18D2C5960@whale.softwire.co.uk>
2002-01-15  2:13 ` Rupert Wood

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).