[OE-core] [PATCH 2/5] mtd-utils: Explicitly add pthread options to cflags
Khem Raj
raj.khem at gmail.com
Sat Mar 17 03:40:33 UTC 2018
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 at gmail.com>
---
meta/recipes-devtools/mtd/mtd-utils_git.bb | 2 ++
1 file changed, 2 insertions(+)
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"
--
2.16.2
More information about the Openembedded-core
mailing list