BUG: in __atexit.c

Jeff Johnston jjohnstn@redhat.com
Tue Jan 3 19:14:00 GMT 2012


Thanks for catching this.  I checked in a patch under your name.

Regards,

-- Jeff J.

On 12/29/2011 07:15 AM, Viachaslau Kulakouski wrote:
> Hi.
> I'm building newlib version 1.20.0 for cortex-m3 target and found a source
> code bug that prevents from building with -D_REENT_SMALL defined.
>
> My configure command is:
> ../newlib-src/configure --prefix=/c/cortex --target=arm-none-yos
> --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as
> --disable-shared --enable-lto --with-float=soft --with-libelf=/usr
> CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections
> -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -D_REENT_SMALL -DSMALL_MEMORY
> -Os -fomit-frame-pointer -D__BUFSIZ__=256 -msoft-float"
> CXXFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections
> -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer
> -D__BUFSIZ__=256 -msoft-float"
>
> I have the following error :
> ../../../../../newlib-src/newlib/libc/stdlib/__atexit.c: In function
> '__register_exitproc':
> ../../../../../newlib-src/newlib/libc/stdlib/__atexit.c:77:8: error: 'lock'
> undeclared (first use in this function)
> ../../../../../newlib-src/newlib/libc/stdlib/__atexit.c:77:8: note: each
> undeclared identifier is reported only once for each function it appears in
>
> It is easy to fix the issue. I've done it but the same issue was at previous
> version too. So I've decided to report a bug to have  the issue fixed.
> To fix the issue one has to change line 77 of __atexit.c  from
> "__lock_release(lock);"  to "__lock_release(__atexit_lock);".
> Best regards,
> Slava
>
>



More information about the Newlib mailing list