Commit 3bb4f21a authored by Mehdi Sabwat's avatar Mehdi Sabwat
Browse files

update patches

- Remove patches that removed fPIC support:
0005-contrib-disable-unsupported-fPIC.patch
0006-openjpeg-Disable-patch-that-forces-PIC.patch

- Update patch that does not apply
0001-contrib-add-emscripten-target.patch

- Add patch to fix empty MESON_SYSTEM_NAME variable
0003-contrib-delete-empty-variable.patch
parent d26bcda5
......@@ -73,7 +73,22 @@ cd vlc
# patching vlc
if [ -d ../vlc_patches ] && [ "$(ls -A ../vlc_patches)" ]; then
git am -3 ../vlc_patches/00*
# core patches
git am -3 ../vlc_patches/0001-contrib-add-emscripten-target.patch
git am -3 ../vlc_patches/0002-contrib-add-ffmpeg-configuration-options-for-wasm-em.patch
git am -3 ../vlc_patches/0003-contrib-delete-empty-variable.patch
git am -3 ../vlc_patches/0006-configure-Create-a-target-for-emscripten-in-the-conf.patch
git am -3 ../vlc_patches/0007-core-initial-core-build-for-emscripten-based-on-POSI.patch
git am -3 ../vlc_patches/0008-compat-add-sigwait-support-for-emscripten.patch
git am -3 ../vlc_patches/0009-compat-add-clock_nanosleep-support.patch
git am -3 ../vlc_patches/0010-emscripten-add-vlc_getProxyUrl-stub.patch
git am -3 ../vlc_patches/0011-configure-disable-deprecated-GL-functions-for-emscri.patch
git am -3 ../vlc_patches/0012-logger-add-emscripten-module.patch
git am -3 ../vlc_patches/0013-window-add-emscripten-type.patch
git am -3 ../vlc_patches/0014-vout-add-emscripten-gl-es2-and-window-modules.patch
git am -3 ../vlc_patches/0015-vlc_common-add-weak-attribute-support-for-wasm.patch
# Add OPENAL support
git am -3 ../vlc_patches/openal/*
fi
......
From a9b2fc82c6a1cbd467b6a19c859b3bf5c3dfd899 Mon Sep 17 00:00:00 2001
From: Etienne Brateau <etienne.brateau@gmail.com>
Date: Fri, 25 Aug 2017 12:05:38 +0200
Subject: [PATCH 01/15] contrib: add emscripten target
From 89483da629c05701ac2ff8a157a67e031e5e471f Mon Sep 17 00:00:00 2001
From: Mehdi Sabwat <mehdisabwat@gmail.com>
Date: Mon, 30 Dec 2019 13:55:23 +0100
Subject: [PATCH 1/1] contrib: add emscripten target
set toolchain variables in bootstrap and main.mak
Co-Author: Etienne Brateau <etienne.brateau@gmail.com>
---
contrib/bootstrap | 3 +++
contrib/src/main.mak | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 577d8b0dc6..8c04d4ecee 100755
index 01a234e55c..b6224bae9d 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -348,6 +348,9 @@ case "${OS}" in
......@@ -18,17 +20,17 @@ index 577d8b0dc6..8c04d4ecee 100755
add_make_enabled "HAVE_NACL"
;;
+ *emscripten*)
+ add_make_enabled "HAVE_EMSCRIPTEN"
+ add_make_enabled "HAVE_EMSCRIPTEN"
+ ;;
esac
#
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 7eef7b85b6..8b65ffdd7b 100644
index 5e5846de97..897020517e 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -126,6 +126,15 @@ CXX := clang++
endif
@@ -133,6 +133,15 @@ EXTRA_CFLAGS += -fno-stack-check
XCODE_FLAGS += OTHER_CFLAGS=-fno-stack-check
endif
+ifdef HAVE_EMSCRIPTEN
......@@ -44,5 +46,5 @@ index 7eef7b85b6..8b65ffdd7b 100644
EXTRA_CXXFLAGS += -stdlib=libc++
ifeq ($(ARCH),x86_64)
--
2.23.0
2.24.1
From ba9735f71e72cd3c7b57b1558a69c9f111316f65 Mon Sep 17 00:00:00 2001
From: Mehdi Sabwat <mehdisabwat@gmail.com>
Date: Tue, 31 Dec 2019 12:02:20 +0100
Subject: [PATCH 1/1] contrib: delete empty variable
As a fwp on c29409d1a742e65b6b2f3c95702196ff9ab1570c this commit fixes an issue
on platforms that are not listed.
---
contrib/src/main.mak | 1 -
1 file changed, 1 deletion(-)
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 897020517e..a0469fb3e0 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -646,7 +646,6 @@ ifdef HAVE_CROSS_COMPILE
echo "set(PKG_CONFIG_EXECUTABLE $(PKG_CONFIG))" >> $@
endif
-MESON_SYSTEM_NAME =
ifdef HAVE_WIN32
MESON_SYSTEM_NAME = windows
else
--
2.24.1
From f9abac545cb3544f553c25b357fe2020d2f2c0ac Mon Sep 17 00:00:00 2001
From: Mehdi Sabwat <mehdisabwat@gmail.com>
Date: Thu, 5 Sep 2019 18:01:23 +0200
Subject: [PATCH 04/15] contrib: disable unsupported -fPIC in wasm backend
Enabling -fPIC will crash the compiler, so we need to disable it for now.
---
contrib/src/main.mak | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 8b65ffdd7b..18f4b038a9 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -310,9 +310,14 @@ ifdef HAVE_WIN32
HOSTCONF += --without-pic
PIC :=
else
+ifdef HAVE_EMSCRIPTEN
+HOSTCONF += --without-pic
+PIC :=
+else
HOSTCONF += --with-pic
PIC := -fPIC
endif
+endif
# For cross-compilation with meson, do not set compiler and flags
# in HOSTVARS as meson will always use them for the BUILD machine compiler!
--
2.23.0
From 7c674ad83adee5a8e7eaa30ae6640fc28cce3102 Mon Sep 17 00:00:00 2001
From: Mehdi Sabwat <mehdisabwat@gmail.com>
Date: Thu, 5 Sep 2019 19:46:34 +0200
Subject: [PATCH 05/15] contrib: disable PIC in openjpeg
It crashes the clang compiler.
PIC is not supported in the wasm backend for now. Issue #9317 in Emscripten
---
contrib/src/openjpeg/rules.mak | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/src/openjpeg/rules.mak b/contrib/src/openjpeg/rules.mak
index 184c484f00..efa17da98e 100644
--- a/contrib/src/openjpeg/rules.mak
+++ b/contrib/src/openjpeg/rules.mak
@@ -20,7 +20,9 @@ ifdef HAVE_VISUALSTUDIO
endif
# $(APPLY) $(SRC)/openjpeg/restrict.patch
$(APPLY) $(SRC)/openjpeg/install.patch
- $(APPLY) $(SRC)/openjpeg/pic.patch
+ifndef HAVE_EMSCRIPTEN
+ $(APPLY) $(SRC)/openjpeg/pic.patch
+endif
$(APPLY) $(SRC)/openjpeg/openjp2_pthread.patch
$(call pkg_static,"./src/lib/openjp2/libopenjp2.pc.cmake.in")
$(MOVE)
--
2.23.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment