contrib: live555: Don't try to use $(LD) to create static libraries on MinGW, use...
authorMartin Storsjö <martin@martin.st>
Mon, 26 Feb 2018 09:31:46 +0000 (11:31 +0200)
committerMartin Storsjö <martin@martin.st>
Mon, 26 Feb 2018 09:34:11 +0000 (11:34 +0200)
This fixes building with llvm-mingw.

contrib/src/live555/mingw-static-libs.patch [new file with mode: 0644]
contrib/src/live555/rules.mak

diff --git a/contrib/src/live555/mingw-static-libs.patch b/contrib/src/live555/mingw-static-libs.patch
new file mode 100644 (file)
index 0000000..b01dfcb
--- /dev/null
@@ -0,0 +1,14 @@
+diff -urN live555-orig/config.mingw live555/config.mingw
+--- live555-orig/config.mingw  2018-02-26 11:28:41.446443807 +0200
++++ live555/config.mingw       2018-02-26 11:29:02.453948892 +0200
+@@ -9,8 +9,8 @@
+ LINK =                 $(CXX) -o 
+ LINK_OPTS =            -L.
+ CONSOLE_LINK_OPTS =    $(LINK_OPTS)
+-LIBRARY_LINK =         $(LD) -o 
+-LIBRARY_LINK_OPTS =    $(LINK_OPTS) -r -Bstatic
++LIBRARY_LINK =         $(AR) cr 
++LIBRARY_LINK_OPTS =
+ LIB_SUFFIX =                   a
+ LIBS_FOR_CONSOLE_APPLICATION = -lws2_32
+ LIBS_FOR_GUI_APPLICATION = -lws2_32
index b77d96c..3093ded 100644 (file)
@@ -76,6 +76,8 @@ endif
        $(APPLY) $(SRC)/live555/add-pkgconfig-file.patch
        # Expose Server:
        $(APPLY) $(SRC)/live555/expose_server_string.patch
+       # Fix creating static libs on mingw
+       $(APPLY) $(SRC)/live555/mingw-static-libs.patch
 
        mv live.$(LIVE555_VERSION) $@ && touch $@