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]

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


Hi, I was searching around for an answer to my problem, when I
happened upon this:

http://sources.redhat.com/ml/ecos-discuss/2003-03/msg00090.html

Which is a pretty good description of the situation I'm in myself.

I'm curious when this change happened though - in the past I was
always able to use plain old gcc, as I am just writing to the FLOPPY
pc target.  In fact, libtarget.a still compiles fine, it's just my
'application' (hello world for the moment) that is not ok.

Here are some more bits:

http://www.cygwin.com/ml/ecos-discuss/2002-12/msg00025.html

As well as:

// Versions of gcc/g++ after 3.0 (approx.), when configured for Linux
// native development (specifically, --with-__cxa_enable), have
// additional dependencies related to the destructors for static
// objects. When compiling C++ code with static objects the compiler
// inserts a call to __cxa_atexit() with __dso_handle as one of the
// arguments. __cxa_atexit() would normally be provided by glibc, and
// __dso_handle is part of crtstuff.c. Synthetic target applications
// are linked rather differently, so either a differently-configured
// compiler is needed or dummy versions of these symbols should be
// provided. If these symbols are not actually used then providing
// them is still harmless, linker garbage collection will remove them.

from the synth target.

I went ahead and added them in the same way to the pc target, and at
least with my hello world app, all is well.

That said, isn't there a way to disable these two guys with a
'regular' compiler, or simply knock them out?

Hrm... reading http://www.codesourcery.com/cxx-abi/ now.

Thanks,
-- 
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]