[2/5] mtd-utils: Explicitly add pthread options to cflags

Message ID 599013164ebd8a85844940a1b8b522dca3c1bf86.1521257828.git.raj.khem@gmail.com
State Accepted
Commit 856aa732cac62a2c45473bcc91f7d0c423c52f81
Headers show
Series
  • RISC-V Build fixes
Related show

Commit Message

Khem Raj March 17, 2018, 3:40 a.m.
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-devtools/mtd/mtd-utils_git.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

Patch

diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 3c34bdd84e..d09d633022 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -24,6 +24,8 @@  S = "${WORKDIR}/git/"
 PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
 PACKAGECONFIG[xattr] = ",,acl,"
 
+CPPFLAGS_append_riscv64  = " -pthread -D_REENTRANT"
+
 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
 
 ALTERNATIVE_${PN} = "flash_eraseall"