[En-Nut-Discussion] Some notes on using GCC 4.4.1 (eh_frame)

Harald Kipp harald.kipp at egnite.de
Sun Sep 6 19:28:41 CEST 2009


Hi Ulrich,

Ulrich Prinz wrote:

> Building NutO/S fails as the new version likes to have unsetenv() return 
> an int. I fixed that in nut/crt/setenv.c
> 
> The question ist, how can I detect the GCC version in the sources to 
> compile the right unsetenv() version?

Ole added a related configuration item.
http://lists.egnite.de/pipermail/en-nut-discussion/2009-February/010366.html

Do not miss the replies to
http://sourceware.org/ml/newlib/2009/msg00144.html
I thought that newlib was done for embedded systems in general, but as
it turned out it is Linux only. :-(


> c:/programme/yagarto/bin/../lib/gcc/arm-elf/4.4.1/../../../../arm-elf/lib\libc.a
> (lib_a-mallocr.o): In function `malloc_extend_top':
> C:\msys\1.0\home\yagarto\newlib-build\arm-elf\newlib\libc\stdlib/../../../../../
> newlib-1.17.0/newlib/libc/stdlib/mallocr.c:2160: undefined reference to 
> `_sbrk_r

That looks like your app is referencing a function, which is not
available in Nut/OS and the linker uses the newlib function instead. You
can try to locate this problem in the map file, but sometimes this is
not easy.

Michael will hopefully be able to help with the remaining questions.
Before releasing this version, he offered it to me for testing. But I
failed to do this in time. Hope we can solve this without the need for
Michael to create a new packet. Otherwise I feel guilty.

Harald








More information about the En-Nut-Discussion mailing list