public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* malloc() fails to compile with --enable-newlib-reent-thread-local
@ 2023-02-03  3:51 H. Peter Anvin
  2023-02-03 12:11 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: H. Peter Anvin @ 2023-02-03  3:51 UTC (permalink / raw)
  To: newlib

Hi,

as of newlib-4.3.0 (git 9e09d6ed83cce4777a5950412647ccc603040409) 
malloc() fails to compile with the following options set:

         --disable-newlib-fseek-optimization \
         --disable-newlib-fvwrite-in-streamio \
         --disable-newlib-mb \
         --disable-newlib-reent-check-verify \
         --disable-newlib-register-fini \
         --disable-newlib-supplied-syscalls \
         --disable-newlib-unbuf-stream-opt \
         --disable-newlib-wide-orient \
         --enable-lite-exit \
         --enable-target-optspace \
         --enable-newlib-multithread \
         --enable-newlib-global-atexit \
         --enable-newlib-nano-formatted-io \
         --enable-newlib-io-c99-formats \
         --enable-newlib-reent-thread-local \
         --enable-newlib-nano-malloc

(same effect without --enable-newlib-nano-malloc).

The reason is that the malloc() routines appear to hard-code the use of 
"reent_ptr->_errno" instead of using _REENT_ERRNO(), but if I'm not 
completely out to sea it really shouldn't be using "reent_ptr" at all, 
similar to the !_LIBC case?

	-hpa


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: malloc() fails to compile with --enable-newlib-reent-thread-local
  2023-02-03  3:51 malloc() fails to compile with --enable-newlib-reent-thread-local H. Peter Anvin
@ 2023-02-03 12:11 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2023-02-03 12:11 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: newlib

On Feb  2 19:51, H. Peter Anvin wrote:
> Hi,
> 
> as of newlib-4.3.0 (git 9e09d6ed83cce4777a5950412647ccc603040409) malloc()
> fails to compile with the following options set:
> 
>         --disable-newlib-fseek-optimization \
>         --disable-newlib-fvwrite-in-streamio \
>         --disable-newlib-mb \
>         --disable-newlib-reent-check-verify \
>         --disable-newlib-register-fini \
>         --disable-newlib-supplied-syscalls \
>         --disable-newlib-unbuf-stream-opt \
>         --disable-newlib-wide-orient \
>         --enable-lite-exit \
>         --enable-target-optspace \
>         --enable-newlib-multithread \
>         --enable-newlib-global-atexit \
>         --enable-newlib-nano-formatted-io \
>         --enable-newlib-io-c99-formats \
>         --enable-newlib-reent-thread-local \
>         --enable-newlib-nano-malloc
> 
> (same effect without --enable-newlib-nano-malloc).
> 
> The reason is that the malloc() routines appear to hard-code the use of
> "reent_ptr->_errno" instead of using _REENT_ERRNO(), but if I'm not
> completely out to sea it really shouldn't be using "reent_ptr" at all,
> similar to the !_LIBC case?

Yeah, looks like it.  Patches welcome!


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-03 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03  3:51 malloc() fails to compile with --enable-newlib-reent-thread-local H. Peter Anvin
2023-02-03 12:11 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).