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]

GCC Cross-compilers for eCos: --enable-threads --enable-__cxa_atexit?


Hi all,

Just wondering what configure options are sensible for building the cross-compilers for
i386 and arm.

At least on linux/i386 for native compilers on 3.2.1 and later we are supposed to use

--enable-threads=posix --enable-__cxa_atexit (C++ ABI compatible flag)

Do these options make sense for (cross) compilers i386-elf and arm-elf?
(Good news: 3.2.1 seems to have fixed the problem with weak symbols/alias stuff.)

BTW using a native compiler (GCC 3.2.x) on linux synthetic target I am now getting
undefined symbols __dso_handle and __cxa_atexit. I'm sure that this is due to the
system compiler being built for C++ ABI compatibility. As I'm not sure
how these symbols are resolved natively does anyone know a workaround for eCos?

(GCC 3.2.x, recent ecos CVS)

Example:

/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_thread.o): In function `__static_initialization_and_destruction_0(int, int)':
/d2/home/cshihpin/tmp/ecostry/install/include/cyg/kernel/smp.hxx:438: undefined reference to `__dso_handle'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_thread.o): In function `__static_initialization_and_destruction_0(int, int)':
/cvs/ecos/ecos/packages/kernel/current/src/common/thread.cxx:110: undefined reference to `__cxa_atexit'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_intr.o): In function `_GLOBAL__I.12000__ZN13Cyg_Interrupt15disable_counterE':
/cvs/ecos/ecos/packages/kernel/current/src/intr/intr.cxx:94: undefined reference to `__dso_handle'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_intr.o): In function `__static_initialization_and_destruction_0':
/cvs/ecos/ecos/packages/kernel/current/src/intr/intr.cxx:111: undefined reference to `__cxa_atexit'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_sched.o): In function `__static_initialization_and_destruction_0(int, int)':
/cvs/ecos/ecos/packages/kernel/current/src/sched/sched.cxx:180: undefined reference to `__dso_handle'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_sched.o): In function `__static_initialization_and_destruction_0':
/cvs/ecos/ecos/packages/kernel/current/src/sched/sched.cxx:185: undefined reference to `__cxa_atexit'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(language_c_libc_startup_mainthread.o): In function `__static_initialization_and_destruction_0':
/cvs/ecos/ecos/packages/language/c/libc/startup/current/src/mainthread.cxx:120: undefined reference to `__dso_handle'
/cvs/ecos/ecos/packages/language/c/libc/startup/current/src/mainthread.cxx:120: undefined reference to `__cxa_atexit'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_clock.o): In function `__static_initialization_and_destruction_0(int, int)':
/cvs/ecos/ecos/packages/kernel/current/src/common/clock.cxx:92: undefined reference to `__dso_handle'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(kernel_clock.o): In function `__static_initialization_and_destruction_0(int, int)':
/d2/home/cshihpin/tmp/ecostry/install/include/cyg/infra/clist.hxx:187: undefined reference to `__cxa_atexit'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(language_c_libc_stdio_stdiofiles.o): In function `__static_initialization_and_destruction_0':
/cvs/ecos/ecos/packages/language/c/libc/stdio/current/src/common/stdiofiles.cxx:79: undefined reference to `__dso_handle'
/cvs/ecos/ecos/packages/language/c/libc/stdio/current/src/common/stdiofiles.cxx:79: undefined reference to `__cxa_atexit'
/d2/home/cshihpin/tmp/ecostry/install/lib/libtarget.a(services_memalloc_common_heaps.o): In function `__static_initialization_and_destruction_0(int, int)':
/d2/home/cshihpin/tmp/ecostry/services/memalloc/common/current/heaps.cxx:19: undefined reference to `__dso_handle'
/d2/home/cshihpin/tmp/ecostry/services/memalloc/common/current/heaps.cxx:19: undefined reference to `__cxa_atexit'
collect2: ld returned 1 exit status
make[1]: *** [/d2/home/cshihpin/tmp/ecostry/install/tests/hal/common/current/tests/context] Error 1
make[1]: Leaving directory `/d2/home/cshihpin/tmp/ecostry/hal/common/current'
make: *** [tests] Error 2


Cheers
Richard









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