blob: 56d9983b13fca4fe434ab45f3152fc4c3b6ac444 [file] [log] [blame]
Brad Bishop08902b02019-08-20 09:16:51 -04001Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/22]
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From edc7680ed5a03cedb5facf14693823455e12c29c Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Tue, 6 Aug 2019 14:53:43 +0100
7Subject: [PATCH libX11] src/util/Makefile: explicitly reset LINK to not use
8 libtool
9
10Simply looking at libtool redefines LINK globally to use libtool, which when
11you're trying to cross-compile to Windows can cause complications.
12
13As in src/util/ we're simply building a small binary for the build host, reset
14LINK to the automake default so that the traditional compile/link steps occur
15without libtool.
16
17Also remove -all-static from LDFLAGS as that is a libtool-specific argument
18intended to solve this problem.
19
20Closes: #100
21Signed-off-by: Ross Burton <ross.burton@intel.com>
22---
23 src/util/Makefile.am | 3 ++-
24 1 file changed, 2 insertions(+), 1 deletion(-)
25
26diff --git a/src/util/Makefile.am b/src/util/Makefile.am
27index 37314370..b7236530 100644
28--- a/src/util/Makefile.am
29+++ b/src/util/Makefile.am
30@@ -7,10 +7,11 @@ AM_CFLAGS = \
31 AM_CPPFLAGS = \
32 -I$(top_srcdir)/include
33
34+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
35 CC = @CC_FOR_BUILD@
36 CPPFLAGS = @CPPFLAGS_FOR_BUILD@
37 CFLAGS = @CFLAGS_FOR_BUILD@
38-LDFLAGS = @LDFLAGS_FOR_BUILD@ -all-static
39+LDFLAGS = @LDFLAGS_FOR_BUILD@
40 LIBS =
41 EXEEXT = @EXEEXT_FOR_BUILD@
42
43--
442.20.1
45