summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-02-04 21:27:40 -0500
committerMatt Turner <mattst88@gmail.com>2013-07-18 13:55:48 -0700
commit73c9b4b0e05fc66629ba250846948dc55c0e7a0d (patch)
treedf99a60ae90c6cb58a90249541c6fef14ad219c7 /configure.ac
parenta48be954ceb250b98fb6ee46d82653532d4e4f2f (diff)
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>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3de0066cd96..35f6797eed6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,6 +100,7 @@ AC_MSG_RESULT([$acv_mesa_CLANG])
dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
dnl versions are explictly not supported.
+GEN_ASM_OFFSETS=no
if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
AC_MSG_CHECKING([whether gcc version is sufficient])
major=0
@@ -117,7 +118,12 @@ if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
else
AC_MSG_RESULT([yes])
fi
+
+ if test "x$cross_compiling" = xyes; then
+ GEN_ASM_OFFSETS=yes
+ fi
fi
+AM_CONDITIONAL([GEN_ASM_OFFSETS], test "x$GEN_ASM_OFFSETS" = xyes)
dnl Make sure the pkg-config macros are defined
m4_ifndef([PKG_PROG_PKG_CONFIG],