[vlc-commits] contrib: vncclient: Backport a patch for picking the right AR tool for cross compilation
Martin Storsjö
git at videolan.org
Fri Jun 15 08:32:34 CEST 2018
vlc | branch: master | Martin Storsjö <martin at martin.st> | Thu Jun 14 10:22:01 2018 +0300| [d2e70f71ca160f9cb753e1435f20135d06f79b72] | committer: Martin Storsjö
contrib: vncclient: Backport a patch for picking the right AR tool for cross compilation
In many cases, the host AR tool just happens to work fine for e.g.
mingw cross builds, but clang targeting x86 mingw recently started
generating code that trips up GNU binutils ar, with cases like this:
/usr/bin/ar: cursor.o: Unrecognized storage class 0 for .rdata symbol `__xmm at 01010101010101010101010101010101'
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2e70f71ca160f9cb753e1435f20135d06f79b72
---
contrib/src/vncclient/cross-ar.patch | 24 ++++++++++++++++++++++++
contrib/src/vncclient/rules.mak | 1 +
2 files changed, 25 insertions(+)
diff --git a/contrib/src/vncclient/cross-ar.patch b/contrib/src/vncclient/cross-ar.patch
new file mode 100644
index 0000000000..92cb82cb7a
--- /dev/null
+++ b/contrib/src/vncclient/cross-ar.patch
@@ -0,0 +1,24 @@
+From 2dc984dcaa28fd4df90fe011a58fd8fe329bc7a1 Mon Sep 17 00:00:00 2001
+From: Thomas Anderson <tanderson at caltech.edu>
+Date: Wed, 15 Apr 2015 03:42:32 +0000
+Subject: [PATCH] configure.ac: Use AC_CHECK_TOOL for cross-compiling support.
+
+When cross-compiling the ar program has the appropriate prefix prepended.
+Respect that here and have autotools autodetect the appropriate tool.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index bcf51283..3069eedd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,7 +24,7 @@ test "x$GCC" = "xyes" && CFLAGS="$CFLAGS -Wall"
+ AC_PROG_MAKE_SET
+ AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+-AC_PATH_PROG([AR], [ar], [/usr/bin/ar],
++AC_CHECK_TOOL([AR], [ar], [/usr/bin/ar],
+ [$PATH:/usr/ccs/bin])
+
+ # Options
diff --git a/contrib/src/vncclient/rules.mak b/contrib/src/vncclient/rules.mak
index 12dfaa049a..e048fd68e0 100644
--- a/contrib/src/vncclient/rules.mak
+++ b/contrib/src/vncclient/rules.mak
@@ -24,6 +24,7 @@ vncclient: LibVNCServer-$(VNCCLIENT_VERSION).tar.gz .sum-vncclient
$(APPLY) $(SRC)/vncclient/vnc-gnutls-pkg.patch
$(APPLY) $(SRC)/vncclient/gnutls-recent.patch
$(APPLY) $(SRC)/vncclient/vnc-gnutls-anon.patch
+ $(APPLY) $(SRC)/vncclient/cross-ar.patch
$(call pkg_static,"libvncclient.pc.in")
$(UPDATE_AUTOCONFIG)
$(MOVE)
More information about the vlc-commits
mailing list