pmdk: Update to 1.8

Licence-Update: Update copyright headers and drop jeamalloc [1]

* Drop upstreamed patch
* Drop jemalloc patch, its no longer applicable
* Fix build with gcc10

[1] https://github.com/pmem/pmdk/commit/bd13816e7c784430343bcc2a7b53314ab998bf62#diff-9879d6db96fd29134fc802214163b95a

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2020-05-11 18:07:01 -07:00
parent 22a3ff957a
commit 1bc3ceeb2b
4 changed files with 54 additions and 66 deletions
@@ -0,0 +1,47 @@
From 721a48e5397bd4ab454482041e55671eae7b189f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 11 May 2020 18:01:11 -0700
Subject: [PATCH] examples: Initialize child_idx
Assign UINT_MAX and assert it
Fixes warning
rtree_map.c:358:12: error: 'child_idx' may be used uninitialized
in this function [-Werror=maybe-uninitialized]
Upstream-Status: Submitted [https://github.com/pmem/pmdk/pull/4802]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/examples/libpmemobj/tree_map/rtree_map.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/examples/libpmemobj/tree_map/rtree_map.c b/src/examples/libpmemobj/tree_map/rtree_map.c
index 995e22bb9..6b3ead65c 100644
--- a/src/examples/libpmemobj/tree_map/rtree_map.c
+++ b/src/examples/libpmemobj/tree_map/rtree_map.c
@@ -8,6 +8,7 @@
#include <ex_common.h>
#include <assert.h>
#include <errno.h>
+#include <limits.h>
#include <stdlib.h>
#include <stdbool.h>
@@ -320,12 +321,13 @@ has_only_one_child(TOID(struct tree_map_node) node, unsigned *child_idx)
static void
remove_extra_node(TOID(struct tree_map_node) *node)
{
- unsigned child_idx;
+ unsigned child_idx = UINT_MAX;
TOID(struct tree_map_node) tmp, tmp_child;
/* Our node has child with only one child. */
tmp = *node;
has_only_one_child(tmp, &child_idx);
+ assert(child_idx != UINT_MAX);
tmp_child = D_RO(tmp)->slots[child_idx];
/*
--
2.26.2
@@ -1,29 +0,0 @@
From 231eb4c75fbfaaf90bca7702bdaf55cf701a3527 Mon Sep 17 00:00:00 2001
From: Alistair Francis <alistair.francis@wdc.com>
Date: Mon, 23 Jul 2018 11:23:39 -0700
Subject: [PATCH] jemalloc/jemalloc.cfg: Specify the host when building
jemalloc
To avoid this error:
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
when cross compiling specify the host when configuring jemalloc.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Upstream-Status: Inappropriate [configuration]
---
src/jemalloc/jemalloc.cfg | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/jemalloc/jemalloc.cfg b/src/jemalloc/jemalloc.cfg
index 196129de6..79ebbab1c 100644
--- a/src/jemalloc/jemalloc.cfg
+++ b/src/jemalloc/jemalloc.cfg
@@ -3,3 +3,4 @@
--with-private-namespace=je_vmem_
--disable-xmalloc
--disable-munmap
+--host=${HOST_SYS}
--
2.14.4
@@ -1,33 +0,0 @@
From 7d0732d69a774e28bc46b8b487d9f61bdd8afbff Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
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 <raj.khem@gmail.com>
---
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
@@ -3,7 +3,7 @@ DESCRIPTION = "Persistent Memory Development Kit"
HOMEPAGE = "http://pmem.io"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1b8430f251523f1bff0c9fb95da7e0ca"
DEPENDS = "ndctl"
# Required to have the fts.h header for musl
@@ -12,12 +12,11 @@ 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://0001-examples-Initialize-child_idx.patch \
file://0002-Makefile-Don-t-install-the-docs.patch \
file://0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch \
"
SRCREV = "bc5e309485df61c452d08367e4b13ba9dfed5071"
SRCREV = "0245d75eaf0f6106c86a7926a45fdf2149e37eaa"
inherit autotools-brokensep pkgconfig
@@ -31,6 +30,10 @@ EXTRA_OEMAKE = "BUILD_EXAMPLES='n' HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECT
# Fix the missing fts libs when using musl
EXTRA_OEMAKE_append_libc-musl = " EXTRA_LIBS='-lfts'"
do_configure_prepend() {
touch .skip-doc
}
do_install() {
oe_runmake prefix=${prefix} DESTDIR=${D} install