Commit 204d6742 authored by Martin Storsjö's avatar Martin Storsjö

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.
parent bc61a1e6
......@@ -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 -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
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