[Fwd: sh4-cross-compiling-gcc-3.0.2 build fails during assembly]

Dan Kegel dank@kegel.com
Tue Jan 15 15:41:00 GMT 2002

Hey folks,
we're having a problem building gcc-3.0.2 for sh4 on an x86 system.
It looks like the build process for gcc is using 'as' without
a prefix, so it's getting the system 'as', which can't understand
the output of sh4 gcc (naturally).

We used strace on the problem line, and verified that xgcc was
searching the path for 'as'.

What are we doing wrong here?


Steven Mueller wrote:
> 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'
> ...
> 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

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

More information about the crossgcc mailing list