summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2017-04-19 15:03:57 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-20 07:55:25 +0100
commit33212a81298a1a74dd8b5ae9bea0b0e440d194c3 (patch)
treef67b815950ab494c2e30ea01681b174e9a4a5ac1 /meta
parent5882e890e8828d4a30ff457823b9740050c3ec65 (diff)
downloadpoky-33212a81298a1a74dd8b5ae9bea0b0e440d194c3.tar.gz
libsdl2: fix build failures on powerpc
Backport patch from upstream to fix build failures on ppc and ppc64. (From OE-Core rev: 705669f8221027b525773a512beb25a7ea5f0275) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch50
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb1
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch b/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
new file mode 100644
index 0000000000..1520bcfb6a
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
@@ -0,0 +1,50 @@
1Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/5184186d4366]
2
3Backport patch from upstream to fix build failures on ppc and ppc64.
4
5Signed-off-by: Kai Kang <kai.kang@windriver.com>
6---
7# HG changeset patch
8# User Sam Lantinga <slouken@libsdl.org>
9# Date 1477159315 25200
10# Node ID 5184186d4366169617b434f5b71c618a7035cde4
11# Parent 71d4148e32de5088c4bc2f04c1e5ded647a2bf82
12Fixed bug 3466 - Can't build 2.0.5 on ppc64
13
14/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
15/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
16 const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
17 ^
18
19diff -r 71d4148e32de -r 5184186d4366 src/video/SDL_blit_N.c
20--- a/src/video/SDL_blit_N.c Wed Oct 19 21:22:42 2016 -0700
21+++ b/src/video/SDL_blit_N.c Sat Oct 22 11:01:55 2016 -0700
22@@ -118,12 +118,6 @@
23 16, 8, 0, 24,
24 0, NULL
25 };
26- if (!srcfmt) {
27- srcfmt = &default_pixel_format;
28- }
29- if (!dstfmt) {
30- dstfmt = &default_pixel_format;
31- }
32 const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
33 0x04, 0x04, 0x04, 0x04,
34 0x08, 0x08, 0x08, 0x08,
35@@ -136,6 +130,14 @@
36 Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
37 Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
38 Uint32 amask;
39+
40+ if (!srcfmt) {
41+ srcfmt = &default_pixel_format;
42+ }
43+ if (!dstfmt) {
44+ dstfmt = &default_pixel_format;
45+ }
46+
47 /* Use zero for alpha if either surface doesn't have alpha */
48 if (dstfmt->Amask) {
49 amask =
50
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
index d747cf18f0..12d3aaf6f0 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
@@ -19,6 +19,7 @@ SRC_URI = " \
19 file://linkage.patch \ 19 file://linkage.patch \
20 file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \ 20 file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
21 file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \ 21 file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
22 file://fix-build-failure-on-ppc.patch \
22" 23"
23 24
24S = "${WORKDIR}/SDL2-${PV}" 25S = "${WORKDIR}/SDL2-${PV}"