summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc Dietrich <marvin24@gmx.de>2009-08-31 08:56:33 -0700
committerBrian Paul <brianp@vmware.com>2009-08-31 10:32:14 -0600
commita48ee529a256611676884262ced218ad6c05f961 (patch)
tree377085003a82c25676f6ca344be269fe49726c69 /src
parentedb117879846155632aaeb66483a3085c7a78815 (diff)
mesa: fix 32bit cross compilation on a 64bit machine
When cross compiling on a 64bit machine, gen_matypes.c is build for the host machine (64bit) but must generates code for the target machine (32bit). This causes wrong offsets all over the place and crashes googleearth on my machine. Solution is to add -m32 when cross compiling. Attached patch is compatible with linux-x86-32 and autoconf based builds.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/x86/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/x86/Makefile b/src/mesa/x86/Makefile
index aa49a9134a..69122c114b 100644
--- a/src/mesa/x86/Makefile
+++ b/src/mesa/x86/Makefile
@@ -21,7 +21,7 @@ clean:
gen_matypes: gen_matypes.c
- $(HOST_CC) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
+ $(HOST_CC) $(ARCH_FLAGS) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
# need some special rules here, unfortunately
matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes