[Buildroot] [PATCH 1/2] package/gcc: define _REENTRANT for OpenRISC when -pthread is passed

Stafford Horne shorne at gmail.com
Wed Jan 19 08:13:54 UTC 2022


On Wed, Jan 19, 2022 at 08:54:11AM +0100, Thomas Petazzoni wrote:
> Hello Fabrice,
> 
> On Tue, 18 Jan 2022 23:24:24 +0100
> Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:
> 
> > Patch added by commit eee96b0f0ad224b3e09a9b98c26d056e18f17fd5 on gcc
> > 9.3.0 must also be applied on gcc 10 and 11 to avoid the following build
> > failure on numerous packages (babeltrace2, pcsc-lite, tpm2-pkcs11,
> > etc.):
> > 
> > configure:13774: checking whether pthreads work with -pthread
> > configure:13868: /home/giuliobenetti/autobuild/run/instance-0/output-1/host/bin/or1k-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g2  -std=gnu99 -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  conftest.c   >&5
> > conftest.c:27:26: error: #error "_REENTRANT must be defined"
> >    27 | #                        error "_REENTRANT must be defined"
> >       |                          ^~~~~
> > 
> > It should be noted that external bootlins will have to be rebuilt.
> > 
> > Fixes:
> >  - http://autobuild.buildroot.org/results/cb58d4fbaeb08d188c2f8bf05ef1604789fa8766
> >  - http://autobuild.buildroot.org/results/7af9d4b68bd46ed260ed66ba2cc3c9c21482e741
> >  - http://autobuild.buildroot.org/results/6f926bec146752873f8032b593f0de1cb222ea46
> > 
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> 
> Wow, this patch still hasn't been accepted in upstream gcc? It's been
> submitted a looong time ago I believe.

Hello,

I must have missed this one.  It looks good to me I will push it upstream.

-Stafford



More information about the buildroot mailing list