Mercurial > nand-ecoscentric
changeset 1093:c04ca65eec48
Try to resolve linking problems for C++ code built with the native
Linux tools.
| author | bartv |
|---|---|
| date | Sat, 05 Jul 2003 23:17:29 +0000 |
| parents | 3764201565e4 |
| children | 68e9fbe50ee5 |
| files | packages/hal/synth/arch/current/ChangeLog packages/hal/synth/arch/current/src/synth_entry.c |
| diffstat | 2 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/synth/arch/current/ChangeLog +++ b/packages/hal/synth/arch/current/ChangeLog @@ -1,3 +1,9 @@ +2003-07-05 Bart Veer <bartv@ecoscentric.com> + + * src/synth_entry.c: + Add more dummy functions to cope with dependencies introduced by + various versions of g++. + 2003-06-27 Jonathan Larmour <jifl@eCosCentric.com> * src/synth.ld: Synthetic linux at least needs libgcc_eh.a in the
--- a/packages/hal/synth/arch/current/src/synth_entry.c +++ b/packages/hal/synth/arch/current/src/synth_entry.c @@ -169,6 +169,18 @@ void _linux_entry( void ) } // ---------------------------------------------------------------------------- +// Stub functions needed for linking with various versions of gcc +// configured for Linux rather than i386-elf. + +#if (__GNUC__ < 3) +// 2.95.x libgcc.a __pure_virtual() calls __write(). +int __write(void) +{ + return -1; +} +#endif + +#if (__GNUC__ >= 3) // 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 @@ -187,5 +199,17 @@ void } void* __dso_handle = (void*) &__dso_handle; +// gcc 3.2.2 (approx). The libsupc++ version of the new operator pulls +// in exception handling code, even when using the nothrow version and +// building with -fno-exceptions. libgcc_eh.a provides the necessary +// functions, but requires a dl_iterate_phdr() function. That is related +// to handling dynamically loaded code so is not applicable to eCos. +int +dl_iterate_phdr(void* arg1, void* arg2) +{ + return -1; +} +#endif + //----------------------------------------------------------------------------- // End of entry.c
