From 2b395fb3f07551ae1ce2e484c14ac59f36e192b0 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Thu, 17 Mar 2016 21:47:53 +0100
Subject: [PATCH] native/TexturePacker: fix compilation with gcc 4.6

Kodi itself depends on gcc >= 4.7 due to its use of the C++11 standard.
When cross-compiling the host gcc currently also needs to be >= 4.7 due
to the texturepacker tool being needed as native binary to compile
Textures.xbt for the target system.

Cross-compiling on a system where host gcc is at version 4.6 fails atm
with this error:

cc1plus: error: unrecognized command line option '-std=c++11'
make[4]: *** [md5.o] Error 1
make[4]: *** Waiting for unfinished jobs....
cc1plus: error: unrecognized command line option '-std=c++11'
cc1plus: error: unrecognized command line option '-std=c++11'

make[4]: *** [DecoderManager.o] Error 1
make[4]: *** [XBTFWriter.o] Error 1
cc1plus: error: unrecognized command line option '-std=c++11'
make[4]: *** [TexturePacker.o] Error 1
cc1plus: error: unrecognized command line option '-std=c++11'
make[4]: *** [decoder/PNGDecoder.o] Error 1
make[3]: *** [all] Error 2
make[2]: *** [native/TexturePacker] Error 2

Using this patch the problem is fixed and a working TexturePacker host
binary is created.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Patch sent upstream: https://github.com/xbmc/xbmc/pull/9378
---
 tools/depends/native/TexturePacker/src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/depends/native/TexturePacker/src/Makefile.am b/tools/depends/native/TexturePacker/src/Makefile.am
index c1fc8be..d075290 100644
--- a/tools/depends/native/TexturePacker/src/Makefile.am
+++ b/tools/depends/native/TexturePacker/src/Makefile.am
@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 
 AM_CFLAGS = -DTARGET_POSIX -DUSE_LZO_PACKING
 AM_CFLAGS += @EXTRA_DEFINES@
-AM_CXXFLAGS = $(AM_CFLAGS) -std=c++11
+AM_CXXFLAGS = $(AM_CFLAGS) -std=c++0x
 
 AM_CPPFLAGS = \
   -I. \
-- 
2.7.0

