Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1][V2] libsdl2: backport patch to fix build failures on powerpc
@ 2017-04-19  7:03 kai.kang
  2017-04-19  7:03 ` [PATCH 1/1] libsdl2: " kai.kang
  0 siblings, 1 reply; 2+ messages in thread
From: kai.kang @ 2017-04-19  7:03 UTC (permalink / raw)
  To: ross.burton; +Cc: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

I didn't find out this patch, so add a gcc option in V1. Thanks for Ross's help.

The following changes since commit def638ebd69cef217ca567352bc08920b79ca03d:

  poky.ent: Removed "python3-expect" package from 3 distros. (2017-04-18 15:51:44 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/libsdl2
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/libsdl2

Kai Kang (1):
  libsdl2: fix build failures on powerpc

 .../libsdl2/libsdl2/fix-build-failure-on-ppc.patch | 50 ++++++++++++++++++++++
 meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb     |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch

-- 
2.10.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] libsdl2: fix build failures on powerpc
  2017-04-19  7:03 [PATCH 0/1][V2] libsdl2: backport patch to fix build failures on powerpc kai.kang
@ 2017-04-19  7:03 ` kai.kang
  0 siblings, 0 replies; 2+ messages in thread
From: kai.kang @ 2017-04-19  7:03 UTC (permalink / raw)
  To: ross.burton; +Cc: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Backport patch from upstream to fix build failures on ppc and ppc64.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 .../libsdl2/libsdl2/fix-build-failure-on-ppc.patch | 50 ++++++++++++++++++++++
 meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb     |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch

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 0000000..1520bcf
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
@@ -0,0 +1,50 @@
+Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/5184186d4366]
+
+Backport patch from upstream to fix build failures on ppc and ppc64.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+# HG changeset patch
+# User Sam Lantinga <slouken@libsdl.org>
+# Date 1477159315 25200
+# Node ID 5184186d4366169617b434f5b71c618a7035cde4
+# Parent  71d4148e32de5088c4bc2f04c1e5ded647a2bf82
+Fixed bug 3466 - Can't build 2.0.5 on ppc64
+
+/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
+/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]
+     const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
+     ^
+
+diff -r 71d4148e32de -r 5184186d4366 src/video/SDL_blit_N.c
+--- a/src/video/SDL_blit_N.c	Wed Oct 19 21:22:42 2016 -0700
++++ b/src/video/SDL_blit_N.c	Sat Oct 22 11:01:55 2016 -0700
+@@ -118,12 +118,6 @@
+         16, 8, 0, 24,
+         0, NULL
+     };
+-    if (!srcfmt) {
+-        srcfmt = &default_pixel_format;
+-    }
+-    if (!dstfmt) {
+-        dstfmt = &default_pixel_format;
+-    }
+     const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
+                                                        0x04, 0x04, 0x04, 0x04,
+                                                        0x08, 0x08, 0x08, 0x08,
+@@ -136,6 +130,14 @@
+     Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
+     Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
+     Uint32 amask;
++
++    if (!srcfmt) {
++        srcfmt = &default_pixel_format;
++    }
++    if (!dstfmt) {
++        dstfmt = &default_pixel_format;
++    }
++
+     /* Use zero for alpha if either surface doesn't have alpha */
+     if (dstfmt->Amask) {
+         amask =
+
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
index d747cf1..12d3aaf 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 = " \
     file://linkage.patch \
     file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
     file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
+    file://fix-build-failure-on-ppc.patch \
 "
 
 S = "${WORKDIR}/SDL2-${PV}"
-- 
2.10.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-19  7:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-19  7:03 [PATCH 0/1][V2] libsdl2: backport patch to fix build failures on powerpc kai.kang
2017-04-19  7:03 ` [PATCH 1/1] libsdl2: " kai.kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox