Re: An error on building the GCC tic6x cross compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kai Ruottu wrote:
> 12.10.2012 10:47, m9802119 kirjoitti:
>> hello:
>>
>> I tried to build tic6x cross compiler in recent days, but always fail.
>>
>> after installation, I haved compile the .c file. Then the error occur. The message as shown in below:
>>
>> $ tic6x-elf-gcc helloworld.c 
>> /usr/local/c6x/lib/gcc/tic6x-elf/4.7.2/../../../../tic6x-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000008100
>> /usr/local/c6x/lib/gcc/tic6x-elf/4.7.2/../../../../tic6x-elf/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
>> /home/spirits/src/build-newlib/tic6x-elf/newlib/libc/reent/../../../../../newlib-1.20.0/newlib/libc/reent/sbrkr.c:58: undefined reference to `sbrk'
>> Every thing is OK when I build arm cross compiler and compile the .c or .cpp files.
>> Can you tell me what happen and how to solve it ?
>>
> 
> You should learn what a "real target" is and how to link apps for it,
> what are start files, 'crt*.o', what
> low-level routines for the hardware, linker scripts etc...

The 'arm-elf' or 'arm-eabi' (expected) case used to have a default "real target",
some ARM-CPU board with a default monitor firmware on it and when linking using
low-level routines (read(), write(),...) using the monitor firmware to interface
the hardware system.

But the tic6x-elf seems to belong to the "unreal elves" category meaning that
it has no TI C6X CPU-board with some firmware or operating system as the default
target system.  So you MUST know what you have and use the right linker script
(and it using the right glue library) for it - if that linker script is provided
with newlib-1.20.0 !




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux