[ECOS] Re: Synthetic target on linux x86_64 host

Tarmo Kuuse tarmo.kuuse@mail.ee
Sun May 3 20:09:00 GMT 2009


Thanks for the tips.

Unfortunately I also host tools like rawether et al (no, they don't 
build either). eCos+gcc is a damn complex system and I don't have time 
(nor motivation, nor skill) for hacking it - when something breaks, 
result is pain, pain, pain. I'll just use a 32-bit environment.

Nick Garnett wrote:
> Ross Younger <wry@ecoscentric.com> writes:
> 
>> Tarmo Kuuse wrote:
>>> Can synthetic target even be built with native x86_64 tools?
>> As Andrew has said it's not a supported environment - synth predates
>> x86_64 by some years - and I suspect would require a proper porting
>> effort in due course.
>>
>> However, I did find myself poking at the synth target on my
>> workstation a few weeks ago (Ubuntu 8.10, 64-bit) and was able to get
>> it going, after a fashion, without very much trouble (and without
>> having to know much about x86/x86_64 guts!) in order to play with some
>> new code I was writing.
>>
>> I was using the eCos i386-elf toolchain; the syscalls and so on all
>> seemed to just work thanks to x86_64's backwards compatibility (and I
>> have various 32-bit compatibility libs installed, which may or may not
>> have helped).
>>
>> I manually configured my ecos.ecc to use i386-elf, and once I had
>> built eCos I had to edit target.ld by hand and remove the mention of
>> libgcc_eh.a in order for my test applications to link. For debugging,
>> the native gdb (not i386-elf-gcc!) just worked.
>>
>> Obviously, running synth cross-architecture in this way is not tested
>> at all - it seemed to work for my limited purposes, and might for you,
>> but if it breaks you get to keep both pieces :-)
> 
> 
> I have also been running the synthetic target on my OpenSuSE 11.0
> x86_64 system. I can do this without making any changes to eCos
> sources at all.
> 
> I compile using the native "gcc" compiler, adding the -m32 flag. The
> default configuration tries to use i686-pc-linux-gnu-gcc, so I have
> put a script of that name in my path that simply contains the line
> "gcc -m32 $*". I have also had to define i686-pc-linux-gnu-ar to "ar
> $*". Those are the only two tools used during a build, and the
> standard native "gdb" then works to debug.
> 
> Like Ross, I have the 32 bit compatibility libraries installed,
> together with the development packages for some. eCos synthetic target
> executables are not dynamically linked, so it may be necessary to
> install the static versions of libraries you already have in dynamic
> form. I simply used trial and error to work out which libraries were
> needed: try a build, work out which header or library is missing, find
> out which RPM it comes from, install that and repeat. The exact
> combination will obviously depend on how a specific distribution
> divided things up into packages, and what you might already have
> installed.

I admire the clever solutions. When the linker dies because something 
called "libgcc_eh.a" is missing I assume it's a sign from the gods 
saying it's not meant to build.

--
Kind regards,
Tarmo Kuuse


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



More information about the Ecos-discuss mailing list