gen_matypes: fix cross-compiling with gcc
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Feb 2013 02:27:40 +0000 (21:27 -0500)
committerMatt Turner <mattst88@gmail.com>
Thu, 18 Jul 2013 20:55:48 +0000 (13:55 -0700)
commit73c9b4b0e05fc66629ba250846948dc55c0e7a0d
treedf99a60ae90c6cb58a90249541c6fef14ad219c7
parenta48be954ceb250b98fb6ee46d82653532d4e4f2f
gen_matypes: fix cross-compiling with gcc

The current gen_matypes logic assumes that the host compiler will produce
information that is useful for the target compiler.  Unfortunately, this
is not the case whenever cross-compiling.

When we detect that we're cross-compiling and using GCC, use the target
compiler to produce assembly from the gen_matypes.c source, then process
it with a shell script to create a usable header.  This is similar to how
the linux kernel creates its asm-offsets.c file.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
configure.ac
src/mesa/x86-64/Makefile.am
src/mesa/x86/Makefile.am
src/mesa/x86/gen_matypes.c