This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mips-elf can't create executables for libstdc++ testsuite


I've been trying to do test runs of a i686-linux cross to mips-elf.
Large parts of the testsuites fall over because executables can't be created.

A typical line from the testsuite log file looks like this (wrapped for
mailing):

/home/pme/build/build-2002-11-17-mips/gcc/g++ -shared-libgcc
-B/home/pme/build/build-2002-11-17-mips/gcc/ -nostdinc++
-L/home/pme/build/build-2002-11-17-mips/mips-elf/libstdc++-v3/src
-L/home/pme/build/build-2002-11-17-mips/mips-elf/libstdc++-v3/src/.libs
-nostdinc -B/home/pme/build/build-2002-11-17-mips/mips-elf/newlib/ -isystem
/home/pme/build/build-2002-11-17-mips/mips-elf/newlib/targ-include
-isystem /home/pme/src/unified/newlib/libc/include
-B/home/pme/build/install-2002-11-17-mips/mips-elf/bin/
-B/home/pme/build/install-2002-11-17-mips/mips-elf/lib/ -isystem
/home/pme/build/install-2002-11-17-mips/mips-elf/include
-L/home/pme/build/build-2002-11-17-mips/ld
-B/home/pme/build/build-2002-11-17-mips/mips-elf//libgloss/mips/
-L/home/pme/build/build-2002-11-17-mips/mips-elf//libgloss/mips
-L/home/pme/src/unified/libgloss/mips -g -fmessage-length=0 -DDEBUG_ASSERT
-DLOCALEDIR="/home/pme/build/build-2002-11-17-mips/mips-elf/libstdc++-v3/po/share/locale"
-nostdinc++
-I/home/pme/build/build-2002-11-17-mips/mips-elf/libstdc++-v3/include/mips-elf
-I/home/pme/build/build-2002-11-17-mips/mips-elf/libstdc++-v3/include
-I/home/pme/src/unified/libstdc++-v3/libsupc++ -I/home/pme/src/unified/libstdc++-v3/libio
-I/home/pme/src/unified/libstdc++-v3/include/backward
-I/home/pme/src/unified/libstdc++-v3/testsuite
/home/pme/src/unified/libstdc++-v3/testsuite/17_intro/header_cerrno.cc    -DDEBUG_ASSERT
-I/home/pme/build/build-2002-11-17-mips/mips-elf//newlib/targ-include
-I/home/pme/src/unified/newlib/libc/include
-B/home/pme/build/build-2002-11-17-mips/mips-elf//libgloss/mips/
-L/home/pme/build/build-2002-11-17-mips/mips-elf//libgloss/mips
-L/home/pme/src/unified/libgloss/mips -L/home/pme/build/build-2002-11-17-mips/ld
-B/home/pme/build/build-2002-11-17-mips/mips-elf//newlib/
-L/home/pme/build/build-2002-11-17-mips/mips-elf//newlib
-L/home/pme/build/build-2002-11-17-mips/mips-elf//libstdc++-v3/testsuite -lv3test -lm
-Wl,-Tidt.ld  -o ./header_cerrno.exe


Note that nothing adds -lc anywhere.  When the command is repeated mainually and -v added, -lc never appears at all.
This leads to link errors like

    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2.o)(.text+0x140c): In function `uw_init_context_1':
    /home/pme/src/unified/gcc/unwind-dw2.c:1130: undefined reference to `memset'
    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2.o)(.text+0x1470):/home/pme/src/unified/gcc/unwind-dw2.c:1134: undefined reference to `abort'
    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2.o)(.text+0x17a8): In function `uw_install_context_1':
    /home/pme/src/unified/gcc/unwind-dw2.c:1193: undefined reference to `memcpy'
    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2-fde.o)(.text+0x5c4): In function `get_cie_encoding':
    /home/pme/src/unified/gcc/unwind-dw2-fde.c:274: undefined reference to `strlen'
    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2-fde.o)(.text+0x17a8):/home/pme/src/unified/gcc/unwind-dw2-fde.c:582: undefined reference to `abort'
    collect2: ld returned 1 exit status

and so forth.  If I run the command manually and add -lc on the very end,
I get

    /home/pme/build/build-2002-11-17-mips/mips-elf//newlib/libc.a(signalr.o)(.text+0x1c): In function `_kill_r':
    /home/pme/src/unified/newlib/libc/reent/signalr.c:61: undefined reference to `kill'
    /home/pme/build/build-2002-11-17-mips/mips-elf//newlib/libc.a(signalr.o)(.text+0x68): In function `_getpid_r':
    /home/pme/src/unified/newlib/libc/reent/signalr.c:96: undefined reference to `getpid'
    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2.o)(.text+0x36c): In function `extract_cie_info':
    /home/pme/src/unified/gcc/unwind-dw2.c:228: undefined reference to `strlen'
    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2.o)(.text+0x17a8): In function `uw_install_context_1':
    /home/pme/src/unified/gcc/unwind-dw2.c:1193: undefined reference to `memcpy'
    /home/pme/build/build-2002-11-17-mips/gcc/libgcc.a(unwind-dw2-fde.o)(.text+0x5c4): In function `get_cie_encoding':
    /home/pme/src/unified/gcc/unwind-dw2-fde.c:274: undefined reference to `strlen'
    collect2: ld returned 1 exit status

but no other link errors (yet).

At this point I decided that was doing something stupid, somewhere,
because I know that others have gotten mips-elf to work.  :-)


Phil

-- 
Keep cool, but don't freeze.
  - Hellman's Mayonnaise


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]