This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos 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]

Using a different toolchain


    From: "John R. Dunning" <jrd@jrd.org>
    Date: Tue, 4 Apr 2006 10:11:53 -0400
    
        From: Andrew Lunn <andrew@lunn.ch>
        Date: Tue, 4 Apr 2006 15:16:47 +0200
    							       i would of
        thought target.ld would work.

Further info, I went back and started over from scratch.  When I use
an out-of-the box config, using one of the mips targets, everything
builds correctly.  I then changed toolchains, by fixing the tool
prefix so as to invoke my 64bit-plus-special-sauce toolchain.

Here's some basic info on the toolchain:

    jrd@test ~/sw/ecos/devo/hack $ xxgcc --version
    mips64el-unknown-linux-gnu-gcc (GCC) 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)
    Copyright (C) 2004 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Cleaned, and compiled everything.  That works ok, but when I get to
the link step, trying to build one of the test executables, I get the
following:

    xxgcc -c  -I/net/home/jrd/sw/ecos/devo/hack/install/include -I/home/jrd/sw/ecos/dist/ecos-2.0/packages/hal/common/v2_0 -I/home/jrd/sw/ecos/dist/ecos-2.0/packages/hal/common/v2_0/src -I/home/jrd/sw/ecos/dist/ecos-2.0/packages/hal/common/v2_0/tests -I. -I/home/jrd/sw/ecos/dist/ecos-2.0/packages/hal/common/v2_0/tests/ -mips64 -EL -msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -G0 -Wp,-MD,tests/context.tmp -o tests/context.o /home/jrd/sw/ecos/dist/ecos-2.0/packages/hal/common/v2_0/tests/context.c
    cc1: warning: command line option "-Woverloaded-virtual" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
    xxgcc -EL -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static -L/net/home/jrd/sw/ecos/devo/hack/install/lib -Ttarget.ld -o /net/home/jrd/sw/ecos/devo/hack/install/tests/hal/common/v2_0/tests/context tests/context.o
    /usr/lib/gcc/mips64el-unknown-linux-gnu/3.4.5/../../../../mips64el-unknown-linux-gnu/bin/ld: target elf32-littlemips not found
    collect2: ld returned 1 exit status
    make[1]: *** [/net/home/jrd/sw/ecos/devo/hack/install/tests/hal/common/v2_0/tests/context] Error 1
    make[1]: Leaving directory `/net/home/jrd/sw/ecos/devo/hack/hal/common/v2_0'
    make: *** [tests] Error 2

I tried a few tweaks to target.ld, primarily changing the
OUTPUT_FORMAT spec to some 64bit values (elf64-tradbigmips,
elf64-tradlittlemips) which I cribbed from another (much more
complicated, but working) linker script that's used by gcc compiling
stuff for this target.  Using that modified target.ld, I got:

    xxgcc -EL -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static -L/net/home/jrd/sw/ecos/devo/hack/install/lib -Ttarget.ld -o /net/home/jrd/sw/ecos/devo/hack/install/tests/hal/common/v2_0/tests/context tests/context.o
    /usr/lib/gcc/mips64el-unknown-linux-gnu/3.4.5/../../../../mips64el-unknown-linux-gnu/bin/ld: /net/home/jrd/sw/ecos/devo/hack/install/lib/vectors.o: ABI is incompatible with that of the selected emulation

... followed by lots more of that error.

So, back to the original question: Should I be able to swap in a
not-shipped-with-ecos toolchain, and come up with a way to get it to
compile and link?  The compilation part appears to be under control,
but I'm still not at all clear on what I need to do make my 64-bit
linker sufficiently happy to produce an elf for me.

As before, any info appreciated.


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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