[ECOS] problems compiling host tools

Bart Veer bartv@ecoscentric.com
Thu Mar 6 15:44:00 GMT 2003


>>>>> "Aldo" == Aldo Dolfi <dolfi@nec-labs.com> writes:

    Aldo> Thanks, Jonathan,
    >>> 
    >>> and I got the linking errors in the attached file. [snip]
    >> 
    >> > 
    >> /home/dolfi/ecos/jessica/install/lib/libtarget.a(kernel_thread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2b): 
    >> In function `__static_initialization_and_destruction_0(int, int)':
    >> /home/dolfi/ecos/jessica/install/include/cyg/kernel/thread.inl:254: 
    >> undefined reference to `__dso_handle'
    >> 
    >> 
    >> This is odd. This implies eCos was built without "-fno-exceptions 
    >> -fno-rtti". But unless you changed the configuration to use different 
    >> flags (as the commands you wrote above indicate) that really shouldn't 
    >> happen.
    >> 
    >> How did you build the i386-elf-gcc? Or where did you get it from? 

    Aldo> Ops, I simply thought I would not need a cross compiler,
    Aldo> because host and target are on the same arch, so I simply
    Aldo> created symlinks to the system provided tools... Is this
    Aldo> wrong?

Yes. In gcc terms an architecture refers to the whole run-time
environment, not just the processor. When you build a compiler for a
Linux system the compiler knows that glibc will provide certain
functionality, and hence the generated code can make calls to e.g.
__dso_handle. Instead for an eCos PC target you need to configure and
build a compiler for raw i386-elf, which means the compiler will make
no such assumptions about the run-time environment.

Bart

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



More information about the Ecos-discuss mailing list