From e39b78ad933d6909c8d851168f2438ff6c9e3180 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 6 Oct 2019 18:26:38 -0700 Subject: pmdk: Update to 1.7 - Examples can be disabled via makefile argument, so drop the patch to disble building them and instead disable building via makefile argument - Add a patch to control secure_getenv definition spill into linux/musl case Signed-off-by: Khem Raj --- ...e-__FreeBSD__-to-control-secure_getenv-de.patch | 33 +++++++++++++++ .../0003-Makefile-Don-t-build-the-examples.patch | 34 --------------- meta-oe/recipes-extended/pmdk/pmdk_1.6.bb | 49 ---------------------- meta-oe/recipes-extended/pmdk/pmdk_1.7.bb | 49 ++++++++++++++++++++++ 4 files changed, 82 insertions(+), 83 deletions(-) create mode 100644 meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch delete mode 100644 meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch delete mode 100644 meta-oe/recipes-extended/pmdk/pmdk_1.6.bb create mode 100644 meta-oe/recipes-extended/pmdk/pmdk_1.7.bb diff --git a/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch b/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch new file mode 100644 index 0000000000..33f25b6a6b --- /dev/null +++ b/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch @@ -0,0 +1,33 @@ +From 7d0732d69a774e28bc46b8b487d9f61bdd8afbff Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 6 Oct 2019 18:15:44 -0700 +Subject: [PATCH] os_posix: Use __FreeBSD__ to control secure_getenv definition + +__USE_GNU does not cover all Linux platforms, e.g. when using musl as C +library, __USE_GNU may not be defined but it does provide secure_getenv +so instead of narrowing the else condition, lets speicifically check for +FreeBSD being the platform, since that seems to be the intention here +anyway + +Upstream-Status: Submitted [https://github.com/pmem/pmdk/pull/3999] +Signed-off-by: Khem Raj +--- + src/common/os_posix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/os_posix.c b/src/common/os_posix.c +index a9a37ef84..052db2383 100644 +--- a/src/common/os_posix.c ++++ b/src/common/os_posix.c +@@ -346,7 +346,7 @@ os_setenv(const char *name, const char *value, int overwrite) + /* + * secure_getenv -- provide GNU secure_getenv for FreeBSD + */ +-#ifndef __USE_GNU ++#if defined(__FreeBSD__) + static char * + secure_getenv(const char *name) + { +-- +2.23.0 + diff --git a/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch b/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch deleted file mode 100644 index dbe9c45e11..0000000000 --- a/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ac24c78f5aa62ba43bb87b74301b659bcc506f11 Mon Sep 17 00:00:00 2001 -From: Alistair Francis -Date: Thu, 18 Jul 2019 15:40:22 +0800 -Subject: [PATCH] Makefile: Don't build the examples - -Signed-off-by: Alistair Francis -Upstream-Status: Inappropriate [disable feature] ---- - src/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/Makefile b/src/Makefile -index 773ab1387..58912f0ab 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -37,13 +37,13 @@ include $(TOP)/src/common.inc - - TARGETS = libpmem libvmem libpmemblk libpmemlog libpmemobj libpmempool\ - libvmmalloc tools --ALL_TARGETS = $(TARGETS) common librpmem examples benchmarks -+ALL_TARGETS = $(TARGETS) common librpmem benchmarks - - SCOPE_DIRS = $(TARGETS) common librpmem rpmem_common - - DEBUG_RELEASE_TARGETS = common libpmem libvmem libpmemblk libpmemlog libpmemobj\ - libpmempool libvmmalloc librpmem --RELEASE_TARGETS = tools examples benchmarks -+RELEASE_TARGETS = tools benchmarks - - CLEAN_NO_JE_TARGETS = $(ALL_TARGETS) rpmem_common test - CLEAN_TARGETS = $(CLEAN_NO_JE_TARGETS) jemalloc --- -2.14.4 - diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.6.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.6.bb deleted file mode 100644 index c8688b2c63..0000000000 --- a/meta-oe/recipes-extended/pmdk/pmdk_1.6.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Persistent Memory Development Kit" -DESCRIPTION = "Persistent Memory Development Kit" -HOMEPAGE = "http://pmem.io" -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7" -DEPENDS = "ndctl" - -# Required to have the fts.h header for musl -DEPENDS_append_libc-musl = " fts" - -S = "${WORKDIR}/git" - -SRC_URI = "git://github.com/pmem/pmdk.git \ - file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \ - file://0002-Makefile-Don-t-install-the-docs.patch \ - file://0003-Makefile-Don-t-build-the-examples.patch \ - " - -SRCREV = "695e6eba28c53a69a0ef7bad3cc0f45c21ef3e00" - -inherit autotools-brokensep pkgconfig - -# Fix jemalloc error: -# | configure: error: cannot run C compiled programs. -# | If you meant to cross compile, use `--host'. -# -# Also fix #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] -EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}' LIB_PREFIX=${baselib}" - -# Fix the missing fts libs when using musl -EXTRA_OEMAKE_append_libc-musl = " EXTRA_LIBS='-lfts'" - -do_install() { - oe_runmake prefix=${prefix} DESTDIR=${D} install - - # Remove uneeded files - rm -rf ${D}/usr/${baselib}/pmdk_debug -} - -# Include these by default otherwise the SDK is not very useful -FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio" -FILES_${PN} += "${libdir}/*so*" -FILES_${PN} += "${libdir}/pkgconfig/*.pc" -FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/* /usr/*/include/" -FILES_${PN} += "/usr/etc" -FILES_${PN} += "/usr/share" - -COMPATIBLE_HOST='(x86_64).*' diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb new file mode 100644 index 0000000000..96da266e65 --- /dev/null +++ b/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb @@ -0,0 +1,49 @@ +SUMMARY = "Persistent Memory Development Kit" +DESCRIPTION = "Persistent Memory Development Kit" +HOMEPAGE = "http://pmem.io" +SECTION = "libs" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7" +DEPENDS = "ndctl" + +# Required to have the fts.h header for musl +DEPENDS_append_libc-musl = " fts" + +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/pmem/pmdk.git \ + file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \ + file://0002-Makefile-Don-t-install-the-docs.patch \ + file://0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch \ + " + +SRCREV = "bc5e309485df61c452d08367e4b13ba9dfed5071" + +inherit autotools-brokensep pkgconfig + +# Fix jemalloc error: +# | configure: error: cannot run C compiled programs. +# | If you meant to cross compile, use `--host'. +# +# Also fix #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] +EXTRA_OEMAKE = "BUILD_EXAMPLES='n' HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}' LIB_PREFIX=${baselib}" + +# Fix the missing fts libs when using musl +EXTRA_OEMAKE_append_libc-musl = " EXTRA_LIBS='-lfts'" + +do_install() { + oe_runmake prefix=${prefix} DESTDIR=${D} install + + # Remove uneeded files + rm -rf ${D}/usr/${baselib}/pmdk_debug +} + +# Include these by default otherwise the SDK is not very useful +FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio" +FILES_${PN} += "${libdir}/*so*" +FILES_${PN} += "${libdir}/pkgconfig/*.pc" +FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/* /usr/*/include/" +FILES_${PN} += "/usr/etc" +FILES_${PN} += "/usr/share" + +COMPATIBLE_HOST='(x86_64).*' -- cgit 1.2.3-korg