diff mbox series

[2/3] liburcu: Explicitly add pthread options to cflags

Message ID 20180309110049.10725-2-raj.khem@gmail.com
State Superseded
Headers show
Series [1/3] packagegroup-core-sdk: Disable SANITIZERS for riscv64 | expand

Commit Message

Khem Raj March 9, 2018, 11 a.m. UTC
Some architectures e.g. riscv gcc does not add -D_REENTRANT
when enabling pthreads. Help it here by adding these options
while gcc gets fixed

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-support/liburcu/liburcu_0.10.1.bb | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.16.2

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Richard Purdie March 9, 2018, 3:56 p.m. UTC | #1
On Fri, 2018-03-09 at 03:00 -0800, Khem Raj wrote:
> Some architectures e.g. riscv gcc does not add -D_REENTRANT
> when enabling pthreads. Help it here by adding these options
> while gcc gets fixed
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-support/liburcu/liburcu_0.10.1.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-support/liburcu/liburcu_0.10.1.bb
> b/meta/recipes-support/liburcu/liburcu_0.10.1.bb
> index 0c8cd3571a..a73890af90 100644
> --- a/meta/recipes-support/liburcu/liburcu_0.10.1.bb
> +++ b/meta/recipes-support/liburcu/liburcu_0.10.1.bb
> @@ -15,3 +15,5 @@ SRC_URI[sha256sum] =
> "9c09220be4435dc27fcd22d291707b94b97f159e0c442fbcd60c168f8f
>  
>  S = "${WORKDIR}/userspace-rcu-${PV}"
>  inherit autotools
> +
> +CPPFLAGS  += "-pthread -D_REENTRANT"

Should we use a riscv override here so that we have some idea why we're
doing this and show its not needed for other arches?

Cheers,

Richard
Khem Raj March 9, 2018, 4:24 p.m. UTC | #2
On Fri, Mar 9, 2018 at 7:56 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2018-03-09 at 03:00 -0800, Khem Raj wrote:

>> Some architectures e.g. riscv gcc does not add -D_REENTRANT

>> when enabling pthreads. Help it here by adding these options

>> while gcc gets fixed

>>

>> Signed-off-by: Khem Raj <raj.khem@gmail.com>

>> ---

>>  meta/recipes-support/liburcu/liburcu_0.10.1.bb | 2 ++

>>  1 file changed, 2 insertions(+)

>>

>> diff --git a/meta/recipes-support/liburcu/liburcu_0.10.1.bb

>> b/meta/recipes-support/liburcu/liburcu_0.10.1.bb

>> index 0c8cd3571a..a73890af90 100644

>> --- a/meta/recipes-support/liburcu/liburcu_0.10.1.bb

>> +++ b/meta/recipes-support/liburcu/liburcu_0.10.1.bb

>> @@ -15,3 +15,5 @@ SRC_URI[sha256sum] =

>> "9c09220be4435dc27fcd22d291707b94b97f159e0c442fbcd60c168f8f

>>

>>  S = "${WORKDIR}/userspace-rcu-${PV}"

>>  inherit autotools

>> +

>> +CPPFLAGS  += "-pthread -D_REENTRANT"

>

> Should we use a riscv override here so that we have some idea why we're

> doing this and show its not needed for other arches?


we could, its a difference in gcc specs for riscv, it seems a bug to me in gcc.
this change actually provides the options that configure tries to
otherwise guess.
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-support/liburcu/liburcu_0.10.1.bb b/meta/recipes-support/liburcu/liburcu_0.10.1.bb
index 0c8cd3571a..a73890af90 100644
--- a/meta/recipes-support/liburcu/liburcu_0.10.1.bb
+++ b/meta/recipes-support/liburcu/liburcu_0.10.1.bb
@@ -15,3 +15,5 @@  SRC_URI[sha256sum] = "9c09220be4435dc27fcd22d291707b94b97f159e0c442fbcd60c168f8f
 
 S = "${WORKDIR}/userspace-rcu-${PV}"
 inherit autotools
+
+CPPFLAGS  += "-pthread -D_REENTRANT"