summaryrefslogtreecommitdiffstats
path: root/patches/libXt-1.0.4/libXt-1.0.4-fix-cross-compile.diff
blob: 3031d57a5f98faa760125e0c66c85dbfa91fbdd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Submitted-By: Sascha Hauer, 2006-02-23
# Committed-By: Sascha Hauer
#
# Error:
#
# crosscompiling sux, x86 doesn't like it, when arm binaries are executed:
#
# make[3]: Entering directory `/ptx/work/sha/ptxdist/ptxdist-projects/ptxdist-0.10-trunk/local_projects/phyCORE-pcm027/build-target/libXt-X11R7.0-1.0.0/src'
# ../util/makestrs -i ..  < ../util/string.list > StringDefs.c
# /bin/sh: ../util/makestrs: cannot execute binary file
# make[3]: *** [StringDefs.c] Error 126
#
#
# Description:
#
# build makestrs for build not for host, using BSP hack, but works
# 
# rediffed for X.org7.1 by Luotao Fu, 2006-06-19
# State:
#
# not submitted upstream. This patch is not complete. For a proper
# fix we need to build makestrs twice: once for compiling and once
# for installing. For ptxdist we don't want to install makestrs, so
# don't care for now
#
--- libXt-X11R7.1-1.0.2.orig/util/Makefile.am	2005-12-10 17:29:07.000000000 +0100
+++ libXt-X11R7.1-1.0.2/util/Makefile.am	2006-06-15 10:49:21.842699066 +0200
@@ -1,3 +1,11 @@
+# evil hack
+CFLAGS=$(CFLAGS_FOR_BUILD)
+CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
+LDFLAGS=$(LDFLAGS_FOR_BUILD)
+
+CC=$(CC_FOR_BUILD)
+LIBTOOL = @LIBTOOL@ --tag=CC
+
 if INSTALL_MAKESTRS
 bin_PROGRAMS = makestrs
 else
@@ -10,7 +18,9 @@
 	StrDefs.ht \
 	string.list
 
-makestrs_CFLAGS = $(XT_CFLAGS)
+makestrs_CFLAGS=$(CFLAGS_FOR_BUILD) $(XT_CFLAGS)
+makestrs_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
+makestrs_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 makestrs_SOURCES = makestrs.c