diff options
| -rw-r--r-- | meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch | 48 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/leveldb/leveldb_git.bb | 19 |
2 files changed, 13 insertions, 54 deletions
diff --git a/meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch b/meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch deleted file mode 100644 index 4b76dd0c31..0000000000 --- a/meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | From d6daac04dab4b3acf4b88f16742d1b402cdc3d83 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Wed, 1 Oct 2014 18:54:04 +0200 | ||
| 4 | Subject: [PATCH] Explicitly disable tcmalloc | ||
| 5 | |||
| 6 | Without this change leveldb autodetects tcmalloc from sysroot and | ||
| 7 | sometimes became dependant on gperftools | ||
| 8 | |||
| 9 | Disable autodetection without TCMALLOC_ENABLED=true pased to make | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 13 | --- | ||
| 14 | build_detect_platform | 16 +++++++++------- | ||
| 15 | 1 file changed, 9 insertions(+), 7 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/build_detect_platform b/build_detect_platform | ||
| 18 | index bb76c4f..a586364 100755 | ||
| 19 | --- a/build_detect_platform | ||
| 20 | +++ b/build_detect_platform | ||
| 21 | @@ -201,15 +201,17 @@ EOF | ||
| 22 | PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy" | ||
| 23 | fi | ||
| 24 | |||
| 25 | - # Test whether tcmalloc is available | ||
| 26 | - $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF | ||
| 27 | - int main() {} | ||
| 28 | + if [ "$TCMALLOC_ENABLED" = "true" ]; then | ||
| 29 | + # Test whether tcmalloc is available | ||
| 30 | + $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF | ||
| 31 | + int main() {} | ||
| 32 | EOF | ||
| 33 | - if [ "$?" = 0 ]; then | ||
| 34 | - PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" | ||
| 35 | - fi | ||
| 36 | + if [ "$?" = 0 ]; then | ||
| 37 | + PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" | ||
| 38 | + fi | ||
| 39 | |||
| 40 | - rm -f $CXXOUTPUT 2>/dev/null | ||
| 41 | + rm -f $CXXOUTPUT 2>/dev/null | ||
| 42 | + fi | ||
| 43 | fi | ||
| 44 | |||
| 45 | PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS" | ||
| 46 | -- | ||
| 47 | 2.1.1 | ||
| 48 | |||
diff --git a/meta-oe/recipes-extended/leveldb/leveldb_git.bb b/meta-oe/recipes-extended/leveldb/leveldb_git.bb index a6a3024301..d44aa14d28 100644 --- a/meta-oe/recipes-extended/leveldb/leveldb_git.bb +++ b/meta-oe/recipes-extended/leveldb/leveldb_git.bb | |||
| @@ -4,15 +4,16 @@ HOMEPAGE = "http://leveldb.googlecode.com" | |||
| 4 | LICENSE = "BSD-3-Clause" | 4 | LICENSE = "BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" |
| 6 | 6 | ||
| 7 | SRCREV = "803d69203a62faf50f1b77897310a3a1fcae712b" | 7 | SRCREV = "a53934a3ae1244679f812d998a4f16f2c7f309a6" |
| 8 | PV = "1.18+git${SRCPV}" | 8 | PV = "1.20+git${SRCPV}" |
| 9 | 9 | ||
| 10 | SRC_URI = "git://github.com/google/${BPN}.git \ | 10 | SRC_URI = "git://github.com/google/${BPN}.git \ |
| 11 | file://0001-Explicitly-disable-tcmalloc.patch \ | ||
| 12 | " | 11 | " |
| 13 | 12 | ||
| 14 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
| 15 | 14 | ||
| 15 | inherit utils | ||
| 16 | |||
| 16 | do_compile() { | 17 | do_compile() { |
| 17 | # do not use oe_runmake. oe_runmake pass to make compilation arguments and override | 18 | # do not use oe_runmake. oe_runmake pass to make compilation arguments and override |
| 18 | # leveldb makefile variable CFLAGS and broke leveldb build. | 19 | # leveldb makefile variable CFLAGS and broke leveldb build. |
| @@ -20,8 +21,14 @@ do_compile() { | |||
| 20 | } | 21 | } |
| 21 | 22 | ||
| 22 | do_install() { | 23 | do_install() { |
| 23 | install -d ${D}${libdir} | 24 | install -d ${D}${libdir} ${D}${bindir} ${D}${includedir}/leveldb |
| 24 | oe_libinstall -C ${S} -so libleveldb ${D}${libdir} | 25 | oe_libinstall -C ${B}/out-shared libleveldb ${D}${libdir} |
| 25 | install -d ${D}${includedir}/leveldb | 26 | oe_libinstall -C ${S}/out-static libleveldb ${D}${libdir} |
| 27 | oe_libinstall -C ${S}/out-static libmemenv ${D}${libdir} | ||
| 28 | install -m 0755 ${B}/out-shared/db_bench ${D}${bindir} | ||
| 29 | install -m 0755 ${B}/out-static/*_test ${D}${bindir} | ||
| 26 | install -m 644 ${S}/include/leveldb/*.h ${D}${includedir}/leveldb/ | 30 | install -m 644 ${S}/include/leveldb/*.h ${D}${includedir}/leveldb/ |
| 27 | } | 31 | } |
| 32 | |||
| 33 | PACKAGES =+ "${PN}-ptest" | ||
| 34 | FILES_${PN}-ptest = "${bindir}" | ||
