This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Compilation errors - old vs new gcc on i386 (cxa_atexit, dso_handle)
- From: Bart Veer <bartv at ecoscentric dot com>
- To: davidw at dedasys dot com
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 2 Jul 2003 16:40:35 +0100 (BST)
- Subject: Re: [ECOS] Compilation errors - old vs new gcc on i386 (cxa_atexit, dso_handle)
- References: <874r252eki.fsf@dedasys.com>
>>>>> "David" == David N Welton <davidw@dedasys.com> writes:
David> Hi, I was searching around for an answer to my problem,
David> when I happened upon this:
David> http://sources.redhat.com/ml/ecos-discuss/2003-03/msg00090.html
David> Which is a pretty good description of the situation I'm in
David> myself.
David> I'm curious when this change happened though - in the past
David> I was always able to use plain old gcc, as I am just
David> writing to the FLOPPY pc target. In fact, libtarget.a still
David> compiles fine, it's just my 'application' (hello world for
David> the moment) that is not ok.
<snip>
David> I went ahead and added them in the same way to the pc
David> target, and at least with my hello world app, all is well.
This is not the right way to address the problem. For gcc > 2.9x you
should not use a native Linux compiler for building eCos on an
x86 target, including the pc. Instead you need an i386-elf-gcc
compiler. That compiler will generate code for a bare embedded target,
without making assumptions about glibc functionality or anything like
that.
The eCos 2.0 installation tool
(http://sources.redhat.com/ecos/getstart.html) allows you to download
prebuilt toolchains provided by eCosCentric. Alternatively see
http://sources.redhat.com/ecos/build-toolchain.html for information on
how to build a suitable toolchain from source.
The synthetic target is special in that we want people to be able to
use it out of the box with existing tools. Hence the odd kludge like a
dummy __cxa_atexit() is acceptable there. It does add some minor bloat
to the system, but memory usage is not an issue when developing for
the synthetic target.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss