Browse Source

MVK: fix build

Fix conflict with cookie patch, and add 0017-core-Fix-TLS-usage.patch
Thomas Guillem 8 years ago
parent
commit
689cfdec13
18 changed files with 120 additions and 69 deletions
  1. 3 3
      Resources/MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch
  2. 3 3
      Resources/MobileVLCKit/patches/0002-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch
  3. 3 3
      Resources/MobileVLCKit/patches/0003-arm_neon-work-around-libtool-issue.patch
  4. 3 3
      Resources/MobileVLCKit/patches/0004-arm_neon-fix-iOS-linking.patch
  5. 3 3
      Resources/MobileVLCKit/patches/0005-disable-neon-volume-plugin.patch
  6. 4 4
      Resources/MobileVLCKit/patches/0006-libvlc-create-VT-zero-copy-variable.patch
  7. 3 3
      Resources/MobileVLCKit/patches/0007-contrib-avcodec-enforce-use-of-FFmpeg.patch
  8. 3 3
      Resources/MobileVLCKit/patches/0008-Enable-System-DL.patch
  9. 3 3
      Resources/MobileVLCKit/patches/0009-deinterlace-merge-arm64-fix-linking-on-appleOS.patch
  10. 5 5
      Resources/MobileVLCKit/patches/0010-http-add-vlc_http_cookies_clear.patch
  11. 16 17
      Resources/MobileVLCKit/patches/0011-libvlc_media-add-cookie_jar-API.patch
  12. 3 3
      Resources/MobileVLCKit/patches/0012-Revert-Contribs-update-libpng-to-1.6.29.patch
  13. 6 6
      Resources/MobileVLCKit/patches/0013-build-rename-exported-symbols-by-module.patch
  14. 3 3
      Resources/MobileVLCKit/patches/0014-contrib-gcrypt-work-around-a-libtool-limitation.patch
  15. 3 3
      Resources/MobileVLCKit/patches/0015-contrib-gcrypt-fix-tvOS-compilation.patch
  16. 3 3
      Resources/MobileVLCKit/patches/0016-contrib-gcrypt-update-patches.patch
  17. 52 0
      Resources/MobileVLCKit/patches/0017-core-Fix-TLS-usage.patch
  18. 1 1
      buildMobileVLCKit.sh

+ 3 - 3
Resources/MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch

@@ -1,7 +1,7 @@
-From 4b65ca0e5492baf610522c288d0902ffbf5bd57a Mon Sep 17 00:00:00 2001
+From 4051ca0b3fe378b4c46a5ab5c6b2e0f62d125736 Mon Sep 17 00:00:00 2001
 From: David Geldreich <david.geldreich@free.fr>
 Date: Fri, 20 Apr 2012 16:41:19 +0200
-Subject: [PATCH 01/16] arm_neon: added function macro to handle the underscore
+Subject: [PATCH 01/17] arm_neon: added function macro to handle the underscore
  prefix for the iOS ARM ABI
 
 ---
@@ -65,5 +65,5 @@ index 0000000000..d853255fec
 +.endm
 +
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0002-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch

@@ -1,7 +1,7 @@
-From 25603283f8fe8f81897777d17f67a14edbdbe850 Mon Sep 17 00:00:00 2001
+From 7b6753c9892d260911443eb9baf2803714f8a35f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 10 Aug 2012 16:02:07 +0200
-Subject: [PATCH 02/16] deinterlace/merge: use a macro to fix compilation for
+Subject: [PATCH 02/17] deinterlace/merge: use a macro to fix compilation for
  iOS
 
 ---
@@ -82,5 +82,5 @@ index dd779029ae..03e5042b28 100644
  	b		1b
 +endfunc
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0003-arm_neon-work-around-libtool-issue.patch

@@ -1,7 +1,7 @@
-From 531e3166c6e2f532c677de7deeb10f07b59a13b5 Mon Sep 17 00:00:00 2001
+From 102091125ec24713f67d44884cea348a6fbbe4b5 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Thu, 18 Dec 2014 22:14:55 +0100
-Subject: [PATCH 03/16] arm_neon: work-around libtool issue
+Subject: [PATCH 03/17] arm_neon: work-around libtool issue
 
 ---
  modules/arm_neon/Makefile.am | 2 ++
@@ -18,5 +18,5 @@ index db81ec0b84..e67e07e61c 100644
  
  libchroma_yuv_neon_plugin_la_SOURCES = \
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0004-arm_neon-fix-iOS-linking.patch

@@ -1,7 +1,7 @@
-From 89da1998c88b3ec87746705e704d26363ce8e542 Mon Sep 17 00:00:00 2001
+From d52777aa44af19ea98e0d9e986d358cba22291b9 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 10 Dec 2014 22:14:55 +0100
-Subject: [PATCH 04/16] arm_neon: fix iOS linking
+Subject: [PATCH 04/17] arm_neon: fix iOS linking
 
 ---
  modules/arm_neon/amplify.S              |  7 ++---
@@ -194,5 +194,5 @@ index a94ae8539f..54b43a79e3 100644
  	pop {r4,pc}
 +endfunc
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0005-disable-neon-volume-plugin.patch

@@ -1,7 +1,7 @@
-From b191554d75722caefceaf3a9dbf7123e3a3dfde1 Mon Sep 17 00:00:00 2001
+From 1f2841f7d8111c487023f1870b8bdd3cf754a96a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 10 Dec 2014 22:14:55 +0100
-Subject: [PATCH 05/16] disable neon volume plugin
+Subject: [PATCH 05/17] disable neon volume plugin
 
 ---
  modules/arm_neon/Makefile.am | 1 -
@@ -19,5 +19,5 @@ index e67e07e61c..690975235f 100644
  	libyuv_rgb_neon_plugin.la
  endif
 -- 
-2.12.2
+2.11.0
 

+ 4 - 4
Resources/MobileVLCKit/patches/0006-libvlc-create-VT-zero-copy-variable.patch

@@ -1,14 +1,14 @@
-From 62047cf78c01a4d2e6d25865982546ea84507e38 Mon Sep 17 00:00:00 2001
+From 2050c7be9fae67690b3c89ca5790e88177e9132f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 4 May 2016 16:00:40 +0200
-Subject: [PATCH 06/16] libvlc: create VT-zero-copy variable
+Subject: [PATCH 06/17] libvlc: create VT-zero-copy variable
 
 ---
  lib/media_player.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/lib/media_player.c b/lib/media_player.c
-index f5ec04a10e..adf450d99e 100644
+index dc17f7765d..dde84ab7c6 100644
 --- a/lib/media_player.c
 +++ b/lib/media_player.c
 @@ -641,6 +641,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
@@ -20,5 +20,5 @@ index f5ec04a10e..adf450d99e 100644
  #ifdef __ANDROID__
      var_Create (mp, "drawable-androidwindow", VLC_VAR_ADDRESS);
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0007-contrib-avcodec-enforce-use-of-FFmpeg.patch

@@ -1,7 +1,7 @@
-From ed8110408e969e29648102f563d92875649b80b3 Mon Sep 17 00:00:00 2001
+From f892058cf71a3cfaaeedb781b7c50495b4b0191d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=83=C2=BChne?= <fkuehne@videolan.org>
 Date: Tue, 12 Jul 2016 13:50:54 +0200
-Subject: [PATCH 07/16] contrib/avcodec: enforce use of FFmpeg
+Subject: [PATCH 07/17] contrib/avcodec: enforce use of FFmpeg
 
 ---
  contrib/src/ffmpeg/rules.mak | 4 ++--
@@ -25,5 +25,5 @@ index 5725e8f11e..5ee8a6896a 100644
  FFMPEG_GITURL := http://git.videolan.org/git/ffmpeg.git
  else
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0008-Enable-System-DL.patch

@@ -1,7 +1,7 @@
-From a98f54d9f426ebdaaa705075daef1127c5c27587 Mon Sep 17 00:00:00 2001
+From 4b383a454629899d4c7574f0989b07b784e905e6 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 22 Jul 2016 11:11:44 +0200
-Subject: [PATCH 08/16] Enable System DL
+Subject: [PATCH 08/17] Enable System DL
 
 ---
  contrib/src/ffmpeg/patch-as-patch-can.patch | 20 ++++++++++++++++++++
@@ -58,5 +58,5 @@ index 5ee8a6896a..453e4566b8 100644
  
  .ffmpeg: ffmpeg
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0009-deinterlace-merge-arm64-fix-linking-on-appleOS.patch

@@ -1,7 +1,7 @@
-From 0e44c76ea1049e61cef8323307c157ea6a40059d Mon Sep 17 00:00:00 2001
+From 0ecc0e07a1b429029bac73e33ff2940b34f6cc48 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Mon, 12 Sep 2016 17:04:05 +0200
-Subject: [PATCH 09/16] deinterlace-merge-arm64: fix linking on appleOS
+Subject: [PATCH 09/17] deinterlace-merge-arm64: fix linking on appleOS
 
 ---
  modules/arm_neon/asm64.S                       | 46 ++++++++++++++++++++++++++
@@ -107,5 +107,5 @@ index db19e54caf..63c04d3fdd 100644
  	ret
 +endfunc
 -- 
-2.12.2
+2.11.0
 

+ 5 - 5
Resources/MobileVLCKit/patches/0010-http-add-vlc_http_cookies_clear.patch

@@ -1,7 +1,7 @@
-From 06eb293002a2e1e356ebeab73fa184b00575a42b Mon Sep 17 00:00:00 2001
+From f7921491ab235c8fad524cc83f47ed098123b935 Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Fri, 16 Sep 2016 15:51:10 +0200
-Subject: [PATCH 10/16] http: add vlc_http_cookies_clear
+Subject: [PATCH 10/17] http: add vlc_http_cookies_clear
 
 Clear all cookies without deleting the jar.
 ---
@@ -23,10 +23,10 @@ index ed7e1613da..da1fe4ef1a 100644
  
  /**
 diff --git a/src/libvlccore.sym b/src/libvlccore.sym
-index 4cb7a22503..419523a7f7 100644
+index aa957ff26d..289a786d51 100644
 --- a/src/libvlccore.sym
 +++ b/src/libvlccore.sym
-@@ -136,6 +136,7 @@ vlc_http_auth_ParseAuthenticationInfoHeader
+@@ -127,6 +127,7 @@ vlc_http_auth_ParseAuthenticationInfoHeader
  vlc_http_auth_FormatAuthorizationHeader
  vlc_http_cookies_new
  vlc_http_cookies_destroy
@@ -61,5 +61,5 @@ index 2e4d3a8663..0929758f62 100644
  }
  
 -- 
-2.12.2
+2.11.0
 

+ 16 - 17
Resources/MobileVLCKit/patches/0011-libvlc_media-add-cookie_jar-API.patch

@@ -1,15 +1,15 @@
-From 9bb515f5f72df03b65fbfaab75cc48572a0899fe Mon Sep 17 00:00:00 2001
+From 19fc64bc72aab272286eac88163b9c512fb7a212 Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Fri, 16 Sep 2016 15:51:11 +0200
-Subject: [PATCH 11/16] libvlc_media: add cookie_jar API
+Subject: [PATCH 11/17] libvlc_media: add cookie_jar API
 
 ---
  include/vlc/libvlc_media.h | 35 +++++++++++++++++++++++++++++++++++
  lib/libvlc.sym             |  2 ++
- lib/media.c                | 26 ++++++++++++++++++++++++++
+ lib/media.c                | 25 +++++++++++++++++++++++++
  lib/media_internal.h       |  2 ++
  lib/media_player.c         |  7 +++++++
- 5 files changed, 72 insertions(+)
+ 5 files changed, 71 insertions(+)
 
 diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
 index 01e571c519..5ca39f51a3 100644
@@ -71,19 +71,18 @@ index caa55981bf..c0d5754abf 100644
  libvlc_playlist_play
  libvlc_release
 diff --git a/lib/media.c b/lib/media.c
-index 4c95c94c8e..86a42cdf88 100644
+index 0ca4627da7..c348df26b7 100644
 --- a/lib/media.c
 +++ b/lib/media.c
-@@ -396,6 +396,8 @@ libvlc_media_t * libvlc_media_new_from_input_item(
-      * It can give a bunch of item to read. */
+@@ -406,6 +406,7 @@ libvlc_media_t * libvlc_media_new_from_input_item(
      p_md->p_subitems        = NULL;
  
+     libvlc_event_manager_init( &p_md->event_manager, p_md );
 +    p_md->p_cookie_jar      = NULL;
-+
-     p_md->p_event_manager = libvlc_event_manager_new( p_md );
-     if( unlikely(p_md->p_event_manager == NULL) )
-     {
-@@ -557,6 +559,9 @@ void libvlc_media_release( libvlc_media_t *p_md )
+ 
+     input_item_Hold( p_md->p_input_item );
+ 
+@@ -561,6 +562,9 @@ void libvlc_media_release( libvlc_media_t *p_md )
  
      input_item_Release( p_md->p_input_item );
  
@@ -93,7 +92,7 @@ index 4c95c94c8e..86a42cdf88 100644
      vlc_cond_destroy( &p_md->parsed_cond );
      vlc_mutex_destroy( &p_md->parsed_lock );
      vlc_mutex_destroy( &p_md->subitems_lock );
-@@ -1274,3 +1279,24 @@ void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
+@@ -1278,3 +1282,24 @@ void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
      }
      free( pp_slaves );
  }
@@ -119,7 +118,7 @@ index 4c95c94c8e..86a42cdf88 100644
 +        vlc_http_cookies_clear( p_md->p_cookie_jar );
 +}
 diff --git a/lib/media_internal.h b/lib/media_internal.h
-index f063ddb5fa..17bbd84fac 100644
+index 5a67e9ff60..0f0341e260 100644
 --- a/lib/media_internal.h
 +++ b/lib/media_internal.h
 @@ -30,6 +30,7 @@
@@ -139,7 +138,7 @@ index f063ddb5fa..17bbd84fac 100644
  
  /* Media Descriptor */
 diff --git a/lib/media_player.c b/lib/media_player.c
-index adf450d99e..e0cf0ee20e 100644
+index dde84ab7c6..c99fabf940 100644
 --- a/lib/media_player.c
 +++ b/lib/media_player.c
 @@ -620,6 +620,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
@@ -150,7 +149,7 @@ index adf450d99e..e0cf0ee20e 100644
  
      /* Video */
      var_Create (mp, "vout", VLC_VAR_STRING|VLC_VAR_DOINHERIT);
-@@ -971,6 +972,12 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
+@@ -965,6 +966,12 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
      for( size_t i = 0; i < ARRAY_SIZE( p_mi->selected_es ); ++i )
          p_mi->selected_es[i] = ES_INIT;
  
@@ -164,5 +163,5 @@ index adf450d99e..e0cf0ee20e 100644
  
      p_input_thread = input_Create( p_mi, p_mi->p_md->p_input_item, NULL,
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0012-Revert-Contribs-update-libpng-to-1.6.29.patch

@@ -1,7 +1,7 @@
-From 204fb45b53eed705bc4d7ac1aafc3cbbe4a9d311 Mon Sep 17 00:00:00 2001
+From 5b2e134ecf5df7dcae1316fdc8ebb0d4534daf31 Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Tue, 18 Apr 2017 17:24:03 +0200
-Subject: [PATCH 12/16] Revert "Contribs: update libpng to 1.6.29"
+Subject: [PATCH 12/17] Revert "Contribs: update libpng to 1.6.29"
 
 This reverts commit 8891af2d84de3caa5c4f2a51acbb2b47647ed62d.
 ---
@@ -58,5 +58,5 @@ index 9a05170afc..c18cfdf214 100644
  
  PKGS += png
 -- 
-2.12.2
+2.11.0
 

+ 6 - 6
Resources/MobileVLCKit/patches/0013-build-rename-exported-symbols-by-module.patch

@@ -1,7 +1,7 @@
-From 42a8f55a8dc85644d5a161414e8c537f5a894938 Mon Sep 17 00:00:00 2001
+From a17dc67ea2f8bc9e85192b1298b9c6dd28820d4c Mon Sep 17 00:00:00 2001
 From: Thomas Guillem <thomas@gllm.fr>
 Date: Tue, 11 Apr 2017 15:15:26 +0200
-Subject: [PATCH 13/16] build: rename exported symbols by module
+Subject: [PATCH 13/17] build: rename exported symbols by module
 
 This is quite ugly and temporary. Ideally we should rename symbols in binaries
 like the Android script do.
@@ -89,7 +89,7 @@ index 5105dd1efd..7c97fc842a 100644
  #define MUX_TEXT N_("Avformat mux")
  #define MUX_LONGTEXT N_("Force use of a specific avformat muxer.")
 diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
-index 833a39d19b..d734774716 100644
+index 1dd0976ee3..ae01aa5711 100644
 --- a/modules/demux/avformat/demux.c
 +++ b/modules/demux/avformat/demux.c
 @@ -152,7 +152,7 @@ static void get_rotation(es_format_t *fmt, AVStream *s)
@@ -169,7 +169,7 @@ index 59a423525c..152ac2983d 100644
      sout_mux_t *p_mux = (sout_mux_t*)p_this;
      sout_mux_sys_t *p_sys = p_mux->p_sys;
 diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
-index 6c81292bc4..0731e2139d 100644
+index 146d129ff8..fa480e4cf9 100644
 --- a/modules/demux/ttml.c
 +++ b/modules/demux/ttml.c
 @@ -391,7 +391,7 @@ static int Demux( demux_t* p_demux )
@@ -181,7 +181,7 @@ index 6c81292bc4..0731e2139d 100644
  {
      demux_t     *p_demux = (demux_t*)p_this;
      demux_sys_t *p_sys;
-@@ -522,12 +522,12 @@ int OpenDemux( vlc_object_t* p_this )
+@@ -530,12 +530,12 @@ int OpenDemux( vlc_object_t* p_this )
      return VLC_SUCCESS;
  
  error:
@@ -320,5 +320,5 @@ index 618db45e7c..669f62ff34 100644
   * frames, each algorithm is responsible for setting the offset correctly.
   * (The default is 0, so if that is correct, there's no need to do anything.)
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0014-contrib-gcrypt-work-around-a-libtool-limitation.patch

@@ -1,7 +1,7 @@
-From a4e30c8ea91de8937201b87cd3bf357e00369482 Mon Sep 17 00:00:00 2001
+From 6bc6c19e1b7cd349e3f4d82f0153af8a78530ac4 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Sun, 7 Dec 2014 20:02:18 +0100
-Subject: [PATCH 14/16] contrib/gcrypt: work-around a libtool limitation
+Subject: [PATCH 14/17] contrib/gcrypt: work-around a libtool limitation
 
 ---
  contrib/src/gcrypt/rules.mak                       |  1 +
@@ -53,5 +53,5 @@ index 0000000000..df97ffb488
 + AM_CFLAGS = $(GPG_ERROR_CFLAGS)
 + 
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0015-contrib-gcrypt-fix-tvOS-compilation.patch

@@ -1,7 +1,7 @@
-From b2805e54de8eb1c208b5a7c5c63c8caf394775d1 Mon Sep 17 00:00:00 2001
+From 3e2bf61afea94cf8b017eb5e0c28688d603c64b0 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Sat, 3 Oct 2015 22:45:14 +0200
-Subject: [PATCH 15/16] contrib/gcrypt: fix tvOS compilation
+Subject: [PATCH 15/17] contrib/gcrypt: fix tvOS compilation
 
 ---
  contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch | 16 ++++++++++++++++
@@ -56,5 +56,5 @@ index bfb8e4e341..60ba2b725e 100644
  GCRYPT_CONF += --disable-aesni-support
  else
 -- 
-2.12.2
+2.11.0
 

+ 3 - 3
Resources/MobileVLCKit/patches/0016-contrib-gcrypt-update-patches.patch

@@ -1,7 +1,7 @@
-From 38d8ec095ab02969fa692a2ccc91beb5c0bd51a0 Mon Sep 17 00:00:00 2001
+From 411e6abbf6d2cbd5f814257d0d2213a6e8c68c7f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Mon, 12 Sep 2016 17:03:37 +0200
-Subject: [PATCH 16/16] contrib/gcrypt: update patches
+Subject: [PATCH 16/17] contrib/gcrypt: update patches
 
 ---
  contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch  | 308 ++++++++++++++++++++-
@@ -363,5 +363,5 @@ index df97ffb488..957f268ad2 100644
   
   # Need to include ../src in addition to top_srcdir because gcrypt.h is
 -- 
-2.12.2
+2.11.0
 

+ 52 - 0
Resources/MobileVLCKit/patches/0017-core-Fix-TLS-usage.patch

@@ -0,0 +1,52 @@
+From e7ca2669f77afced27ec82f932973a2a4d712a74 Mon Sep 17 00:00:00 2001
+From: Thomas Guillem <thomas@gllm.fr>
+Date: Fri, 2 Jun 2017 15:56:34 +0200
+Subject: [PATCH 17/17] core: Fix TLS usage
+
+TLS is not implement on arm ios (for iPhone5). We may drop this platform for
+4.0, so this patch is only temporary.
+---
+ src/misc/variables.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/misc/variables.c b/src/misc/variables.c
+index 121ef5ea70..3e7b43f912 100644
+--- a/src/misc/variables.c
++++ b/src/misc/variables.c
+@@ -1378,7 +1378,7 @@ void DumpVariables(vlc_object_t *obj)
+     vlc_mutex_unlock(&vlc_internals(obj)->var_lock);
+ }
+ 
+-static _Thread_local void *twalk_ctx;
++static vlc_threadvar_t twalk_key;
+ 
+ static void TwalkGetNames(const void *data, const VISIT which, const int depth)
+ {
+@@ -1387,7 +1387,7 @@ static void TwalkGetNames(const void *data, const VISIT which, const int depth)
+     (void) depth;
+ 
+     const variable_t *var = *(const variable_t **)data;
+-    DECL_ARRAY(char *) *names = twalk_ctx;
++    DECL_ARRAY(char *) *names = vlc_threadvar_get(twalk_key);
+     char *dup = strdup(var->psz_name);
+     if (dup != NULL)
+         ARRAY_APPEND(*names, dup);
+@@ -1400,11 +1400,14 @@ char **var_GetAllNames(vlc_object_t *obj)
+     DECL_ARRAY(char *) names;
+     ARRAY_INIT(names);
+ 
+-    twalk_ctx = &names;
++    if (vlc_threadvar_create(&twalk_key, NULL) != 0)
++        return NULL;
++    vlc_threadvar_set(twalk_key, &names);
+     vlc_mutex_lock(&priv->var_lock);
+     twalk(priv->var_root, TwalkGetNames);
+     vlc_mutex_unlock(&priv->var_lock);
+ 
++    vlc_threadvar_delete(&twalk_key);
+     if (names.i_size == 0)
+         return NULL;
+     ARRAY_APPEND(names, NULL);
+-- 
+2.11.0
+

+ 1 - 1
buildMobileVLCKit.sh

@@ -21,7 +21,7 @@ OSVERSIONMINCFLAG=miphoneos-version-min
 OSVERSIONMINLDFLAG=ios_version_min
 ROOT_DIR=empty
 
-TESTEDHASH=6bc7a637
+TESTEDHASH=f6edc3e
 
 CORE_COUNT=`sysctl -n machdep.cpu.core_count`
 let MAKE_JOBS=$CORE_COUNT+1