Eric Williams wrote:
I'm following Eric Norum's instructions on building the cross-
compiler and libraries for RTEMS powerpc (http://www.aps.anl.gov/epics/base/RTEMS/tutorial/node6.html
), and got the following messages during the Make:
make[2]: Entering directory `/usr/local/rtems/tools/build/gcc'
(SHLIB_LINK='' \
SHLIB_MULTILIB=''; \
gcc -c -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -
Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I../../
gcc-4.2.3/gcc -I../../gcc-4.2.3/gcc/. -I../../gcc-4.2.3/gcc/../
include -I../../gcc-4.2.3/gcc/../libcpp/include -I../../gcc-4.2.3/
gcc/../libdecnumber -I../libdecnumber -
DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/
usr/local/rtems/rtems-4.9/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/
usr/local/rtems/rtems-4.9/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=
\"4.2.3\" -DDEFAULT_TARGET_MACHINE=\"powerpc-rtems4.9\" -
DSTANDARD_BINDIR_PREFIX=\"/usr/local/rtems/rtems-4.9/bin/\" -
DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "X${SHLIB_LINK}" = "X"
|| test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` `test "X$
{SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` \
-I. -I. -I../../gcc-4.2.3/gcc -I../../gcc-4.2.3/gcc/. -I../../
gcc-4.2.3/gcc/../include -I../../gcc-4.2.3/gcc/../libcpp/include -
I../../gcc-4.2.3/gcc/../libdecnumber -I../libdecnumber ../../
gcc-4.2.3/gcc/cp/g++spec.c)
/tmp/ccajeJCg.s: Assembler messages:
/tmp/ccajeJCg.s:11: Error: unknown pseudo-op: `.bss'
/tmp/ccajeJCg.s:134: Error: Unrecognized opcode: `pushq'
/tmp/ccajeJCg.s:136: Error: Unrecognized opcode: `pushq'
/tmp/ccajeJCg.s:139: Error: Unrecognized opcode: `movl'
/tmp/ccajeJCg.s:142: Error: Unrecognized opcode: `pushq'
/tmp/ccajeJCg.s:144: Error: Unrecognized opcode: `pushq'
/tmp/ccajeJCg.s:147: Error: Unrecognized opcode: `xorl'
/tmp/ccajeJCg.s:150: Error: Unrecognized opcode: `pushq'
etc., etc.
Any guesses what went wrong? Build environment is Linux
2.6.9-55.0.9.ELsmp (RedHat Enterprise WS rel. 4) x86_64 and gcc
3.4.5.
--
Eric Williams
ALS Controls, LBL
Could it be that you have a cross 'as' in your PATH?
What does 'which as' say?
When glancing over Eric's instruction I didn't see one detail:
after installing the 'binutils', in order to be able to build gcc
you do need the cross-assembler etc. in your PATH but
as 'powerpc-rtems4.9-as', not 'as'. Hence you'd have to add
/usr/local/rtems/rtems-4.9/bin/
to your PATH. This directory should contain powerpc-rtems4.9-as &
friends.
The cross-assembler is also available as
/usr/local/rtems/rtems-4.9/powerpc-rtems/bin/as
but you don't want that one to be picked up -- you would get
the error message you saw.