This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Problem downloading eCos
> > libbackend.a(recog.o)(.text+0x2335): undefined reference to `PUSH_ROUNDING'
> > collect2: ld returned 1 exit status
>
>Build failure of the moment probably. Time to read
It turns out that this was a bug both introduced and fixed the day I
downloaded my sources (typical luck, eh?). There are several problems
lurking behind this one, though. However after some hours tweaking I have
got a lot closer to getting it to compile. Maybe you can help? I can't get
past these errors at the end. I think I'm getting near though.
Below is what to do. I am not sure that all of those steps are necessary.
However they do point to some broken parts of the build process. In
particular, I don't understand why those header files get included
recursively in cygwin, but not in Linux...
Download gcc sources from 20010322 or later (NOTE: 20010321 has a known
problem, don't download it). Configure gcc according to instructions for
arm-elf. The text below assumes you have your gcc sources in
/src/gcc/gcc-xxxxxxxx and your temp build directory is /tmp/build/gcc.
Strip CRs from /src/gcc/gcc-xxxxxxxx/gcc/config/arm/arm.md
Build according to instructions. You'll eventually get to about 10,000
lines of errors. Strip CRs from /tmp/build/gcc/gcc/tconfig.h and edit that
file:
add to the top:
#ifndef LARWE_TCONFIG_H
#define LARWE_TCONFIG_H
add to the bottom:
#endif
Strip CRs from the file /src/gcc/gcc-xxxxxxxx/gcc/config/arm/elf.h, edit
the file and add to the top:
#ifndef LARWE_ARM_ELF_H
#define LARWE_ARM_ELF_H
add to the bottom:
#endif
Strip CRs from the file /src/gcc/gcc-xxxxxxxx/gcc/config/arm/unknown-elf.h,
edit the file and add to the top:
#ifndef LARWE_UNKNOWN_ELF_H
#define LARWE_UNKNOWN_ELF_H
add to the bottom:
#endif
Strip CRs from the file /src/gcc/gcc-xxxxxxxx/gcc/longlong.h, edit the file
and add a blank line to the end.
Now you wind up with these errors (see make.out attached)
make: Entering directory `/tmp/build/gcc'
make[1]: Entering directory `/tmp/build/gcc/libiberty'
make[2]: Entering directory `/tmp/build/gcc/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/build/gcc/libiberty/testsuite'
make[1]: Leaving directory `/tmp/build/gcc/libiberty'
make[1]: Entering directory `/tmp/build/gcc/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/bin/sh /digiframe/gccdl/gcc/install-sh -c" "INSTALL_DATA=/bin/sh /digiframe/gccdl/gcc/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh /digiframe/gccdl/gcc/install-sh -c " "INSTALL_SCRIPT=/bin/sh /digiframe/gccdl/gcc/install-sh -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/tools/H-i686-pc-cygwin" "infodir=/tools/info" "libdir=/tools/H-i686-pc-cygwin/lib" "prefix=/tools" "tooldir=/tools/H-i686-pc-cygwin/arm-elf" "AR=ar" "AS=as" "CC=gcc" "CXX=c++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do
make[1]: Leaving directory `/tmp/build/gcc/zlib'
make[1]: Entering directory `/tmp/build/gcc/gcc'
(cd intl && make all)
make[2]: Entering directory `/tmp/build/gcc/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/build/gcc/gcc/intl'
(cd po && make all)
make[2]: Entering directory `/tmp/build/gcc/gcc/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/build/gcc/gcc/po'
if [ -f specs.ready ] ; then \
true; \
else \
touch specs.ready; \
fi
make GCC_FOR_TARGET="/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc -B/tmp/build/gcc/arm-elf/newlib/ -isystem /tmp/build/gcc/arm-elf/newlib/targ-include -isystem /digiframe/gccdl/gcc/newlib/libc/include -B/tools/H-i686-pc-cygwin/arm-elf/bin/ -B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem /tools/H-i686-pc-cygwin/arm-elf/include" \
HOST_PREFIX="" HOST_PREFIX_1="loser-" \
AR_FOR_TARGET="arm-elf-ar" \
AR_CREATE_FOR_TARGET="arm-elf-ar rc" \
AR_FLAGS_FOR_TARGET="" \
OLDCC="cc" CCLIBFLAGS="-O" \
CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long" \
RANLIB_FOR_TARGET="arm-elf-ranlib" \
RANLIB_TEST_FOR_TARGET="[ -f arm-elf-ranlib ] || ( [ "i686-pc-cygwin" = "arm-unknown-elf" ] && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )" \
NM_FOR_TARGET="arm-elf-nm" AWK="gawk" \
LIBGCC2_CFLAGS="-O2 -DCROSS_COMPILE -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -Dinhibit_libc -fno-inline -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc" \
INCLUDES="-I. -I. -I/digiframe/gccdl/gcc/gcc -I/digiframe/gccdl/gcc/gcc/. -I/digiframe/gccdl/gcc/gcc/config -I/digiframe/gccdl/gcc/gcc/../include" MAYBE_USE_COLLECT2="" \
CONFIG_H="config.h auto-host.h gansidecl.h /digiframe/gccdl/gcc/gcc/config/i386/xm-cygwin.h /digiframe/gccdl/gcc/gcc/config/arm/unknown-elf.h defaults.h insn-codes.h" MACHMODE_H="machmode.h machmode.def" \
LIB1ASMSRC='arm/lib1funcs.asm' \
MAKEOVERRIDES= \
-f libgcc.mk all
make[2]: Entering directory `/tmp/build/gcc/gcc'
for d in libgcc thumb libgcc/thumb; do \
if [ -d $d ]; then true; else mkdir $d; fi \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc -B/tmp/build/gcc/arm-elf/newlib/ -isystem /tmp/build/gcc/arm-elf/newlib/targ-include -isystem /digiframe/gccdl/gcc/newlib/libc/include -B/tools/H-i686-pc-cygwin/arm-elf/bin/ -B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem /tools/H-i686-pc-cygwin/arm-elf/include -O2 -DCROSS_COMPILE -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -Dinhibit_libc -fno-inline -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/digiframe/gccdl/gcc/gcc -I/digiframe/gccdl/gcc/gcc/. -I/digiframe/gccdl/gcc/gcc/config -I/digiframe/gccdl/gcc/gcc/../include -DL_muldi3 -c /digiframe/gccdl/gcc/gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from /digiframe/gccdl/gcc/gcc/libgcc2.h:320,
from /digiframe/gccdl/gcc/gcc/config/arm/elf.h:46,
from /digiframe/gccdl/gcc/gcc/config/arm/unknown-elf.h:205,
from tconfig.h:3,
from /digiframe/gccdl/gcc/gcc/libgcc2.c:36:
/digiframe/gccdl/gcc/gcc/longlong.h: In function `__mulhi3':
/digiframe/gccdl/gcc/gcc/longlong.h:362: warning: implicit declaration of function `__umulsidi3'
In file included from /digiframe/gccdl/gcc/gcc/libgcc2.h:320,
from /digiframe/gccdl/gcc/gcc/config/arm/elf.h:46,
from /digiframe/gccdl/gcc/gcc/config/arm/unknown-elf.h:205,
from tconfig.h:3,
from /digiframe/gccdl/gcc/gcc/libgcc2.c:36:
/digiframe/gccdl/gcc/gcc/longlong.h:2236:5: warning: no newline at end of file
/digiframe/gccdl/gcc/gcc/longlong.h:1511:1: unterminated #ifndef
/digiframe/gccdl/gcc/gcc/longlong.h:1508:1: unterminated #else
/digiframe/gccdl/gcc/gcc/longlong.h:1488:1: unterminated #ifdef
In file included from /digiframe/gccdl/gcc/gcc/config/arm/unknown-elf.h:205,
from tconfig.h:3,
from /digiframe/gccdl/gcc/gcc/libgcc2.c:36:
/digiframe/gccdl/gcc/gcc/config/arm/elf.h: At top level:
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:354: parse error before "__mulhi3"
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:354: parse error before "u"
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:355: warning: return type defaults to `int'
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:355: conflicting types for `__mulhi3'
/digiframe/gccdl/gcc/gcc/longlong.h:355: previous declaration of `__mulhi3'
/digiframe/gccdl/gcc/gcc/config/arm/elf.h: In function `__mulhi3':
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:359: `u' undeclared (first use in this function)
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:359: (Each undeclared identifier is reported only once
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:359: for each function it appears in.)
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:360: `v' undeclared (first use in this function)
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:360: warning: left-hand operand of comma expression has no effect
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:363: `UWtype' undeclared (first use in this function)
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:363: parse error before "uu"
In file included from /digiframe/gccdl/gcc/gcc/config/arm/unknown-elf.h:205,
from tconfig.h:3,
from /digiframe/gccdl/gcc/gcc/libgcc2.c:36:
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:742:34: warning: no newline at end of file
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:724:1: unterminated #ifdef
/digiframe/gccdl/gcc/gcc/libgcc2.c: At top level:
/digiframe/gccdl/gcc/gcc/libgcc2.c:354: parse error before "__mulhi3"
/digiframe/gccdl/gcc/gcc/libgcc2.c:354: parse error before "u"
/digiframe/gccdl/gcc/gcc/libgcc2.c:355: warning: return type defaults to `int'
/digiframe/gccdl/gcc/gcc/libgcc2.c:355: warning: function declaration isn't a prototype
/digiframe/gccdl/gcc/gcc/libgcc2.c:355: redefinition of `__mulhi3'
/digiframe/gccdl/gcc/gcc/config/arm/elf.h:355: `__mulhi3' previously defined here
/digiframe/gccdl/gcc/gcc/libgcc2.c: In function `__mulhi3':
/digiframe/gccdl/gcc/gcc/libgcc2.c:360: warning: left-hand operand of comma expression has no effect
/digiframe/gccdl/gcc/gcc/libgcc2.c:363: parse error before "uu"
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/tmp/build/gcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/tmp/build/gcc/gcc'
make: *** [all-gcc] Error 2
make: Leaving directory `/tmp/build/gcc'
=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/
"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."