vlc | branch: master | Martin Storsjö <[email protected]> | Thu Dec 14 12:08:39 2017 +0200| [696cb02d7bbd491cdc8a2df29b53d48f391b59c5] | committer: Martin Storsjö
contrib: x265: Patch x265 to skip the resource file CMake uses a static library to pass files to the linker. CMake does request windres to produce a COFF formatted object file, but llvm-mingw's windres wrapper currently overrides it and produces a .res (arch independent) formatted one instead. LLD doesn't support such files in static libraries. Just don't bother with the resource file for now, it's irrelevant from VLC's point of view - it's only used for the executable and shared library, neither of which are used by VLC. Passing -DCMAKE_RC_COMPILER=FALSE on the cmake configuration line sounds like a different workaround, but that doesn't seem to work though - then we suddenly start getting -fPIC flags to the compiler, which clang errors out on. This can be dropped once llvm-mingw doesn't need to force the windres output into the arch independent format. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=696cb02d7bbd491cdc8a2df29b53d48f391b59c5 --- contrib/src/x265/rules.mak | 1 + contrib/src/x265/win-skip-res.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/contrib/src/x265/rules.mak b/contrib/src/x265/rules.mak index 95b797333a..146d9da045 100644 --- a/contrib/src/x265/rules.mak +++ b/contrib/src/x265/rules.mak @@ -27,6 +27,7 @@ x265: x265-$(X265_VERSION).tar.bz2 .sum-x265 mkdir -p $@-$(X265_VERSION) tar xvjf "$<" --strip-components=1 -C $@-$(X265_VERSION) $(APPLY) $(SRC)/x265/x265-ldl-linking.patch + $(APPLY) $(SRC)/x265/win-skip-res.patch $(call pkg_static,"source/x265.pc.in") ifndef HAVE_WIN32 $(APPLY) $(SRC)/x265/x265-pkg-libs.patch diff --git a/contrib/src/x265/win-skip-res.patch b/contrib/src/x265/win-skip-res.patch new file mode 100644 index 0000000000..ffac8d5930 --- /dev/null +++ b/contrib/src/x265/win-skip-res.patch @@ -0,0 +1,12 @@ +diff -urN x265-orig/source/CMakeLists.txt x265/source/CMakeLists.txt +--- x265-orig/source/CMakeLists.txt 2017-12-14 10:04:53.932080387 +0000 ++++ x265/source/CMakeLists.txt 2017-12-14 10:05:35.151167937 +0000 +@@ -441,7 +441,7 @@ + ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) + +-if(CMAKE_RC_COMPILER) ++if(FALSE) + # The resource compiler does not need CFLAGS or macro defines. It + # often breaks them + string(REPLACE "<FLAGS>" "" CMAKE_RC_COMPILE_OBJECT "${CMAKE_RC_COMPILE_OBJECT}") _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
