aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-03-16 20:40:33 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-20 09:30:18 +0000
commit856aa732cac62a2c45473bcc91f7d0c423c52f81 (patch)
treea50a3a2c256d0eec36e83a98133327d43e87727d /meta/recipes-devtools
parentcf757ca67325415a26555c67a098f168453339a4 (diff)
downloadopenembedded-core-contrib-856aa732cac62a2c45473bcc91f7d0c423c52f81.tar.gz
mtd-utils: Explicitly add pthread options to cflags
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> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils_git.bb2
1 files changed, 2 insertions, 0 deletions
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"