This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: Compilation errors - old vs new gcc on i386 (cxa_atexit, dso_handle)


Bart Veer <bartv@ecoscentric.com> writes:

> >>>>> "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
>     David> in myself.

>     David> I'm curious when this change happened though - in the
>     David> past I was always able to use plain old gcc, as I am just
>     David> writing to the FLOPPY pc target. In fact, libtarget.a
>     David> still compiles fine, it's just my 'application' (hello
>     David> world for 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
>     David> 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.

It's certainly not your job to worry about it, but this seems ugly.  I
already have an "i386-elf" compiler, and I there should be a way to
output what I need for my platform with it.  The linux kernel, for
instance, doesn't require the C library, and runs 'on bare metal',
more or less.

-fno-use-cxa-atexit

seems to take care of cxa_atexit.  Maybe there is something for
__dso_handle, too?

> 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.

Sure.  I would submit that the pc floppy target is another case where
it would be convenient if it worked with the compiler that people are
likely to have on their systems.

Thankyou for your time,
-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

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


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