Compilation errors for a i486 target

Reinier Coetzer reinier.coetzer@gmail.com
Mon Mar 31 07:02:00 GMT 2008


Hi all,

My target is a EBOX with a VortexSX CPU. This is basically just a i486 processor
without a FPU. I'm running X-Linux on it, which is just a small Linux
developed by the
guys from EBOX.

I want to develop C/C++ code on my desktop PC for the EBOX. The X-Linux version
runs the 2.6.18 kernel and glibc 2.3.3. I want to use crosstool to
build such an
environment on my desktop PC.

I noticed that there is no demo script for i486, just for i686, so I
simpy created a
demo-i486.sh script containing the following:

================================================================

#!/bin/sh
# This script has one line for each known working toolchain
# for this architecture.  Uncomment the one you want.
# Generated by generate-demo.pl from buildlogs/all.dats.txt

set -ex
TARBALLS_DIR=$HOME/downloads
 RESULT_TOP=/opt/crosstool
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES

# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
 mkdir -p $RESULT_TOP

eval `cat i486.dat gcc-4.0.0-glibc-2.3.3.dat` sh all.sh --notest

echo Done.

================================================================

I then created a i486.dat file containing the following:

================================================================
TARGET=i486-unknown-linux-gnu
 TARGET_CFLAGS="-march=i486 -O2"
GLIBC_EXTRA_CONFIG="--without-fp"
================================================================

I then simply run 'sh demo-i486.sh' and it downloaded the relevant
files and started to compile, but I got the
 following compilation error and I dont know what caused it.

i486-unknown-linux-gnu-ranlib
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc.a
cd /home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc
&& /home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/gcc-core-prefix/lib/gcc-lib/i486-unknown-linux-gnu/3.3.6/../../../../i486-unknown-linux-gnu/bin/ar
cruv libc_nonshared.a `cat csu/stamp.oST iconv/stamp.oST
iconvdata/stamp.oST locale/stamp.oST localedata/stamp.oST
assert/stamp.oST ctype/stamp.oST intl/stamp.oST catgets/stamp.oST
math/stamp.oST setjmp/stamp.oST signal/stamp.oST stdlib/stamp.oST
stdio-common/stamp.oST libio/stamp.oST dlfcn/stamp.oST
malloc/stamp.oST string/stamp.oST wcsmbs/stamp.oST timezone/stamp.oST
time/stamp.oST dirent/stamp.oST grp/stamp.oST pwd/stamp.oST
posix/stamp.oST io/stamp.oST termios/stamp.oST resource/stamp.oST
misc/stamp.oST socket/stamp.oST sysvipc/stamp.oST gmon/stamp.oST
gnulib/stamp.oST wctype/stamp.oST manual/stamp.oST shadow/stamp.oST
po/stamp.oST argp/stamp.oST crypt/stamp.oST linuxthreads/stamp.oST
resolv/stamp.oST nss/stamp.oST rt/stamp.oST conform/stamp.oST
debug/stamp.oST linuxthreads_db/stamp.oST inet/stamp.oST
hesiod/stamp.oST sunrpc/stamp.oST nis/stamp.oST nscd/stamp.oST
streams/stamp.oST login/stamp.oST elf/stamp.oST stamp.oST`
 a - csu/elf-init.oST
a - stdlib/atexit.oST
a - io/stat.oST
a - io/fstat.oST
a - io/lstat.oST
a - io/mknod.oST
a - io/stat64.oST
a - io/fstat64.oST
a - io/lstat64.oST
i486-unknown-linux-gnu-ranlib
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc_nonshared.a
 i486-unknown-linux-gnu-gcc    -nostdlib -nostartfiles -r -o
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc_pic.os
\
 -Wl,-d -Wl,--whole-archive
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc_pic.a
 i486-unknown-linux-gnu-gcc    -shared -Wl,-O1 \
  -nostdlib -nostartfiles \
   -Wl,-dynamic-linker=/lib/ld-linux.so.2 -Wl,-z,combreloc \
  -Wl,--verbose 2>&1 | \
  sed > /home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/shlib.ldsT
\
       -e '/^=========/,/^=========/!d;/^=========/d' \
      -e 's/^.*\.hash[  ]*:.*$/  .note.ABI-tag : { *(.note.ABI-tag) } &/' \
      -e 's/^.*\*(\.dynbss).*$/& \
         PROVIDE(__start___libc_freeres_ptrs = .); \
          *(__libc_freeres_ptrs) \
         PROVIDE(__stop___libc_freeres_ptrs = .);/'
mv -f /home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/shlib.ldsT
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/shlib.lds
 i486-unknown-linux-gnu-gcc    -shared -static-libgcc -Wl,-O1
-Wl,-z,defs -Wl,-dynamic-linker=/lib/ld-linux.so.2
-B/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/csu/
 -Wl,--version-script=/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc.map
-Wl,-soname=libc.so.6 -Wl,-z,combreloc -nostdlib -nostartfiles -e
__libc_main -L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/math
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/elf
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/dlfcn
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/nss
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/nis
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/rt
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/resolv
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/crypt
-L/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/linuxthreads
-Wl,-rpath-link=/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/math:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/elf:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/dlfcn:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/nss:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/nis:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/rt:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/resolv:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/crypt:/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/linuxthreads
-o /home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc.so
-T /home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/shlib.lds
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/csu/abi-note.o
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/elf/soinit.os
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc_pic.os
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/elf/sofini.os
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/elf/interp.os
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/elf/ld.so
-lgcc
 /home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc_pic.os:
In function `ldexpl':
: undefined reference to `__finitel'
/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc_pic.os:
In function `ldexpl':
 : undefined reference to `__finitel'
collect2: ld returned 1 exit status
make[1]: *** [/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/build-glibc/libc.so]
Error 1
make[1]: Leaving directory
`/home/harry/Desktop/crosstool-0.43/build/i486-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.3/glibc-2.3.3'
 make: *** [all] Error 2

Can someone please help me in explaining what went wrong here?
It would greatly be appreciated!

Kind Regards
  Reinier

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list