* [ECOS] Using a different toolchain
@ 2006-04-04 13:05 John R. Dunning
2006-04-04 13:17 ` Andrew Lunn
2006-04-04 14:23 ` [ECOS] " Grant Edwards
0 siblings, 2 replies; 7+ messages in thread
From: John R. Dunning @ 2006-04-04 13:05 UTC (permalink / raw)
To: ecos-discuss
Hi all. I'm trying to find hints on how to get ecos to build using a
non-stock toolchain. It's gcc, but not one of the canned ones that
comes with ecos.
First, is there a way to convince ecosconfig and friends to generate a
different tool prefix in the makefiles? It seemed like it was
designed for that, but I couldn't find it. If not, it's no big deal,
I can tweak the makefiles after generation.
Second, is there documentation on what sections and other
constructions are required in the linker script? I tried using a
linker script from another (non-ecos) project, but that failed
miserably. I have the impression that the script I'm using just
doesn't have enough in it, but I don't speak ld well enough to know
what I'm missing. Do I just need to go read up on that stuff in order
to get my linker script right?
Any other hints or things I should look at? TIA...
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Using a different toolchain
2006-04-04 13:05 [ECOS] Using a different toolchain John R. Dunning
@ 2006-04-04 13:17 ` Andrew Lunn
2006-04-04 14:12 ` John R. Dunning
2006-04-04 14:23 ` [ECOS] " Grant Edwards
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2006-04-04 13:17 UTC (permalink / raw)
To: John R. Dunning; +Cc: ecos-discuss
On Tue, Apr 04, 2006 at 09:05:44AM -0400, John R. Dunning wrote:
> Hi all. I'm trying to find hints on how to get ecos to build using a
> non-stock toolchain. It's gcc, but not one of the canned ones that
> comes with ecos.
>
> First, is there a way to convince ecosconfig and friends to generate a
> different tool prefix in the makefiles? It seemed like it was
> designed for that, but I couldn't find it. If not, it's no big deal,
> I can tweak the makefiles after generation.
You want to change CYGBLD_GLOBAL_COMMAND_PREFIX
> Second, is there documentation on what sections and other
> constructions are required in the linker script? I tried using a
> linker script from another (non-ecos) project, but that failed
> miserably. I have the impression that the script I'm using just
> doesn't have enough in it, but I don't speak ld well enough to know
> what I'm missing. Do I just need to go read up on that stuff in order
> to get my linker script right?
What is wrong with the linker script eCos generates? Since you are
still using gcc and i assume you are still using binutils, i would of
thought target.ld would work.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ECOS] Using a different toolchain
2006-04-04 13:17 ` Andrew Lunn
@ 2006-04-04 14:12 ` John R. Dunning
2006-04-06 3:11 ` John R. Dunning
0 siblings, 1 reply; 7+ messages in thread
From: John R. Dunning @ 2006-04-04 14:12 UTC (permalink / raw)
To: Andrew Lunn; +Cc: John R. Dunning, ecos-discuss
From: Andrew Lunn <andrew@lunn.ch>
Date: Tue, 4 Apr 2006 15:16:47 +0200
You want to change CYGBLD_GLOBAL_COMMAND_PREFIX
Ok, tnx.
What is wrong with the linker script eCos generates? Since you are
still using gcc and i assume you are still using binutils,
Yes.
i would of
thought target.ld would work.
Well, I dunno; I may just be not looking at the right thing. I'm
trying to use what amounts to a 64-bit mips toolchain (it's a mips
instruction set, with some extra hacks added to it for custom
hardware) so I started with the 32-bit stuff, got that to build ok,
then tried swapping in the 64-bit stuff. The 64-bit linker barfed on
the references to elf32-littlemips in target.ld, so I tried changing
them to what I thought were equivalent 64-bit things, but that didn't
work either. I tried using the linker script that I use for other
(non-ecos) binaries on this platform, and that said it built an
executable, but when I objdump it, there's nothing in .text.
Perhaps I need to go off and read up on linker scripts, because my
non-ecos one bears approximately zero resemblance to the ecos one, and
I can intuit only vaguely what either one of them are doing :-{
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ECOS] Re: Using a different toolchain
2006-04-04 13:05 [ECOS] Using a different toolchain John R. Dunning
2006-04-04 13:17 ` Andrew Lunn
@ 2006-04-04 14:23 ` Grant Edwards
1 sibling, 0 replies; 7+ messages in thread
From: Grant Edwards @ 2006-04-04 14:23 UTC (permalink / raw)
To: ecos-discuss
In gmane.os.ecos.general, you wrote:
> Hi all. I'm trying to find hints on how to get ecos to build using a
> non-stock toolchain.
There's no trick to it: you just do it.
> It's gcc, but not one of the canned ones that comes with ecos.
I've never used a "canned" toolkit.
> First, is there a way to convince ecosconfig and friends to
> generate a different tool prefix in the makefiles?
You mean different filenames for gcc et al?
It's probably easiest to just create symlinks so that the
default filenames work.
> It seemed like it was designed for that, but I couldn't find
> it. If not, it's no big deal, I can tweak the makefiles after
> generation.
>
> Second, is there documentation on what sections and other
> constructions are required in the linker script? I tried
> using a linker script from another (non-ecos) project,
Again, why?
> but that failed miserably.
In what way?
> I have the impression that the script I'm using just doesn't
> have enough in it, but I don't speak ld well enough to know
> what I'm missing. Do I just need to go read up on that stuff
> in order to get my linker script right?
Either that or tell us how it failed.
--
Grant Edwards grante Yow! I feel better about
at world problems now!
visi.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ECOS] Using a different toolchain
2006-04-04 14:12 ` John R. Dunning
@ 2006-04-06 3:11 ` John R. Dunning
2006-04-06 3:38 ` [ECOS] " Grant Edwards
2006-04-06 6:39 ` [ECOS] " Andrew Lunn
0 siblings, 2 replies; 7+ messages in thread
From: John R. Dunning @ 2006-04-06 3:11 UTC (permalink / raw)
To: John R. Dunning; +Cc: Andrew Lunn, ecos-discuss
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ECOS] Re: Using a different toolchain
2006-04-06 3:11 ` John R. Dunning
@ 2006-04-06 3:38 ` Grant Edwards
2006-04-06 6:39 ` [ECOS] " Andrew Lunn
1 sibling, 0 replies; 7+ messages in thread
From: Grant Edwards @ 2006-04-06 3:38 UTC (permalink / raw)
To: ecos-discuss
On 2006-04-06, John R. Dunning <jrd@jrd.org> wrote:
> 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?
Certainly. I've never used a "shipped-with-ecos-toolchain".
> 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.
The linker scripts generated by eCos have always worked for my
(32-bit) "home-built" toolchains.
--
Grant Edwards grante Yow! Your CHEEKS sit like
at twin NECTARINES above
visi.com a MOUTH that knows no
BOUNDS --
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Using a different toolchain
2006-04-06 3:11 ` John R. Dunning
2006-04-06 3:38 ` [ECOS] " Grant Edwards
@ 2006-04-06 6:39 ` Andrew Lunn
1 sibling, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2006-04-06 6:39 UTC (permalink / raw)
To: John R. Dunning; +Cc: ecos-discuss
On Wed, Apr 05, 2006 at 11:11:17PM -0400, John R. Dunning wrote:
> 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
Try -V so we can see what is being passed from gcc to ld.
Have you been able to compile and link anything with the toolchain?
Are there any build in self tests?
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-06 6:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-04 13:05 [ECOS] Using a different toolchain John R. Dunning
2006-04-04 13:17 ` Andrew Lunn
2006-04-04 14:12 ` John R. Dunning
2006-04-06 3:11 ` John R. Dunning
2006-04-06 3:38 ` [ECOS] " Grant Edwards
2006-04-06 6:39 ` [ECOS] " Andrew Lunn
2006-04-04 14:23 ` [ECOS] " Grant Edwards
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).