summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-11-08 15:12:52 +0800
committerArmin Kuster <akuster808@gmail.com>2019-11-10 13:54:34 -0800
commit4e3e8d8270f318e6384c3d9bb5f6c7503f41d736 (patch)
tree66a18a6b63c3323249f37c5ead90a1ac6675e9fb
parent3361760dbb46cca2e00f053286404b5df39590b3 (diff)
downloadopenembedded-core-contrib-4e3e8d8270f318e6384c3d9bb5f6c7503f41d736.tar.gz
openembedded-core-contrib-4e3e8d8270f318e6384c3d9bb5f6c7503f41d736.tar.bz2
openembedded-core-contrib-4e3e8d8270f318e6384c3d9bb5f6c7503f41d736.zip
libsdl2: fix race when building in parallel
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch45
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch
new file mode 100644
index 0000000000..bba3a6d240
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch
@@ -0,0 +1,45 @@
+From 6a4cc6d0a53402f646045c2994844237d978f9b5 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Fri, 8 Nov 2019 15:07:22 +0800
+Subject: [PATCH] configure: check for build dir when building version res
+
+Fixes a race where we try to build version res file in build directory
+before it has even been created. Prevents errors like:
+
+/bin/bash ../SDL2-2.0.10/build-scripts/updaterev.sh
+/bin/bash ../SDL2-2.0.10/build-scripts/mkinstalldirs build
+mkdir -p -- build
+x86_64-pokysdk-mingw32-windres --include-dir=/home/pokybuild/yocto-worker/meta-mingw/build/build/tmp/work/x86_64-nativesdk-mingw32-pokysdk-mingw32/nativesdk-libsdl2/2.0.10-r0/recipe-sysroot/opt/poky/3.0/sysroots/x86_64-pokysdk-mingw32/usr/include ../SDL2-2.0.10/src/main/windows/version.rc build/version.o
+x86_64-pokysdk-mingw32-windres: build/version.o: No such file or directory
+Makefile:692: recipe for target 'build/version.o' failed
+make: *** [build/version.o] Error 1
+make: *** Waiting for unfinished jobs....
+touch build/.created
+WARNING: exit code 1 from a shell command.
+
+Extension of upstream fix:
+https://hg.libsdl.org/SDL/rev/99d8b18acf8a
+
+Upstream-Status: Pending
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1aea11fbd..186229ab0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4177,7 +4177,7 @@ VERSION_OBJECTS=`echo $VERSION_SOURCES`
+ VERSION_DEPENDS=`echo $VERSION_SOURCES`
+ VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
+ VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
++\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
+ \\$(WINDRES) \\$< \\$@,g"`
+
+ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
+--
+2.21.0
+
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
index cdc8650e17..ab514f0533 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
@@ -15,6 +15,7 @@ PROVIDES = "virtual/libsdl2"
SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
file://more-gen-depends.patch \
file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \
+ file://0001-configure-check-for-build-dir-when-building-version-.patch \
"
S = "${WORKDIR}/SDL2-${PV}"