[vlc-commits] contrib: postproc: Don't add -fPIC when targeting windows
Martin Storsjö
git at videolan.org
Wed Nov 28 15:21:47 CET 2018
vlc/vlc-3.0 | branch: master | Martin Storsjö <martin at martin.st> | Wed Dec 13 17:00:41 2017 +0200| [9239e614a3955f9005d6afaa77b5719c6b9237c6] | committer: Hugo Beauzée-Luyssen
contrib: postproc: Don't add -fPIC when targeting windows
This roughly matches 3965d404ccd from libav/ffmpeg. With GCC,
adding -fPIC when building for windows (x86_64) results in a warning,
while it is an error with clang.
(cherry picked from commit 204d67423273dc4937d652fe12f037882ca79458)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=9239e614a3955f9005d6afaa77b5719c6b9237c6
---
contrib/src/postproc/rules.mak | 1 +
contrib/src/postproc/win-pic.patch | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/contrib/src/postproc/rules.mak b/contrib/src/postproc/rules.mak
index 87d405f060..62d2fbcbc1 100644
--- a/contrib/src/postproc/rules.mak
+++ b/contrib/src/postproc/rules.mak
@@ -119,6 +119,7 @@ $(TARBALLS)/postproc-$(POSTPROC_VERSION).tar.xz:
postproc: postproc-$(POSTPROC_VERSION).tar.xz .sum-postproc
$(UNPACK)
+ $(APPLY) $(SRC)/postproc/win-pic.patch
$(MOVE)
.postproc: postproc
diff --git a/contrib/src/postproc/win-pic.patch b/contrib/src/postproc/win-pic.patch
new file mode 100644
index 0000000000..2ce0e93164
--- /dev/null
+++ b/contrib/src/postproc/win-pic.patch
@@ -0,0 +1,22 @@
+diff -urN postproc-orig/configure postproc/configure
+--- postproc-orig/configure 2012-08-21 23:27:39.000000000 +0300
++++ postproc/configure 2018-02-25 23:57:21.100768782 +0200
+@@ -2418,9 +2418,15 @@
+
+ enable_pic() {
+ enable pic
+- add_cppflags -DPIC
+- add_cflags -fPIC
+- add_asflags -fPIC
++ case "$target_os" in
++ mingw*|cygwin*|win*)
++ ;;
++ *)
++ add_cppflags -DPIC
++ add_cflags -fPIC
++ add_asflags -fPIC
++ ;;
++ esac
+ }
+
+ enabled pic && enable_pic
More information about the vlc-commits
mailing list