Re: [PATCH] or1k: Fix compilation for __OR1K_MULTICORE__ builds

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Mar 28 10:09, Stafford Horne wrote:
> When building newlib for multicore environments we specify __OR1K_MULTICORE__
> which switches the build to allocate one struct _or1k_reent per CPU
> dynamiocally.
> 
> This was using a strange definition of (*_or1k_reent)[], and causing
> the following compiler error:
> 
>     ./gnu-toolchain/newlib/libgloss/or1k/impure.c: In function ‘_or1k_reent_init’:
>     ./gnu-toolchain/newlib/libgloss/or1k/impure.c:121:21: error: assignment to ‘struct ..
>       121 |         _or1k_reent = (struct _or1k_reent*) _sbrk_r(0, memsize);
> 	  |
> 
> Fix this compiler error by changing the or1k_reent definition to a pointer
> to structs.
> 
> Signed-off-by: Stafford Horne <[email protected]>
> ---
>  libgloss/or1k/impure.c         | 2 +-
>  libgloss/or1k/or1k-internals.h | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Pushed.

Thanks,
Corinna
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.