aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-09-21 20:23:15 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-10-02 12:35:39 +0000
commitdb68fbc7846ae9e950d907c18056d29dcdc81374 (patch)
treed219b48f6f131742f33fd3d1312c1ce373024aab
parent107071acc6a0694db61a64b5b8c926790fa14bcf (diff)
downloadmeta-openembedded-contrib-db68fbc7846ae9e950d907c18056d29dcdc81374.tar.gz
meta-openembedded-contrib-db68fbc7846ae9e950d907c18056d29dcdc81374.tar.bz2
meta-openembedded-contrib-db68fbc7846ae9e950d907c18056d29dcdc81374.zip
leveldb: Fix parallel build
Add build parallelism, since we do not use oe_runmake Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-extended/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch35
-rw-r--r--meta-oe/recipes-extended/leveldb/leveldb_git.bb3
2 files changed, 37 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch b/meta-oe/recipes-extended/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch
new file mode 100644
index 0000000000..5068654e2d
--- /dev/null
+++ b/meta-oe/recipes-extended/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch
@@ -0,0 +1,35 @@
+From c85978e77725ef233543370d24e23f853f449170 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Sep 2017 17:47:02 -0700
+Subject: [PATCH] Makefile: Fix parallel build
+
+Sometimes mkdir $(SHARED_OUTDIR)/db races with compiler which is
+creating .o file in the same directory $(SHARED_OUTDIR)/db/db_bench.o
+
+Fixes error like
+
+| mkdir out-static
+| mkdir out-shared/db
+| Assembler messages:
+| Fatal error: can't create out-shared/db/db_bench.o: No such file or directory
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -386,7 +386,7 @@ $(STATIC_OUTDIR)/write_batch_test:db/wri
+ $(STATIC_OUTDIR)/memenv_test:$(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS)
+ $(XCRUN) $(CXX) $(LDFLAGS) $(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS) -o $@ $(LIBS)
+
+-$(SHARED_OUTDIR)/db_bench:$(SHARED_OUTDIR)/db/db_bench.o $(SHARED_LIBS) $(TESTUTIL)
++$(SHARED_OUTDIR)/db_bench:$(SHARED_OUTDIR)/db $(SHARED_OUTDIR)/db/db_bench.o $(SHARED_LIBS) $(TESTUTIL)
+ $(XCRUN) $(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SHARED_OUTDIR)/db/db_bench.o $(TESTUTIL) $(SHARED_OUTDIR)/$(SHARED_LIB3) -o $@ $(LIBS)
+
+ .PHONY: run-shared
diff --git a/meta-oe/recipes-extended/leveldb/leveldb_git.bb b/meta-oe/recipes-extended/leveldb/leveldb_git.bb
index dfe4b459ac..8fec89c6f1 100644
--- a/meta-oe/recipes-extended/leveldb/leveldb_git.bb
+++ b/meta-oe/recipes-extended/leveldb/leveldb_git.bb
@@ -10,6 +10,7 @@ PV = "1.20+git${SRCPV}"
SRC_URI = "git://github.com/google/${BPN}.git \
file://0001-build_detect_platform-Check-for-__SSE4_2__.patch \
file://0002-makefile-build-SHARED_MEMENVLIB.patch \
+ file://0001-Makefile-Fix-parallel-build.patch \
"
S = "${WORKDIR}/git"
@@ -19,7 +20,7 @@ inherit utils
do_compile() {
# do not use oe_runmake. oe_runmake pass to make compilation arguments and override
# leveldb makefile variable CFLAGS and broke leveldb build.
- CFLAGS="${CFLAGS}" make || die
+ CFLAGS="${CFLAGS}" make ${PARALLEL_MAKE}|| die
}
do_install() {