-# LB_LINUX_CROSS
-#
-# check for cross compilation
-#
-AC_DEFUN([LB_LINUX_CROSS], [
-AC_CACHE_CHECK([for cross compilation], lb_cv_cross, [
-lb_cv_cross="no"
-AS_IF([test "x$cross_compiling" = xyes],
- [AS_CASE([$host_vendor],
- [k1om | mpss], [
- # The K1OM architecture is an extension of the x86 architecture
- # and in MPSS 2.1 it's defined in $host_vendor. But in MPSS 3.x
- # it's defined in $host_arch. So, try to support both case.
- lb_cv_cross=$($CC -v 2>&1 | grep Target: | sed -e 's/Target: //')
- AS_IF([test "$lb_cv_cross" != x86_64-k1om-linux -a \
- "$lb_cv_cross" != k1om-mpss-linux], [
- AC_MSG_ERROR([Cross compiler not found in PATH.])
- ])
- ])
- ])
-])
-AS_IF([test "$lb_cv_cross" = x86_64-k1om-linux -o \
- "$lb_cv_cross" = k1om-mpss-linux], [
- CROSS_VARS="ARCH=k1om CROSS_COMPILE=${lb_cv_cross}-"
- CROSS_PATH="${CROSS_PATH:=/opt/lustre/$VERSION/$lb_cv_cross}"
- CCAS=$CC
- # need to produce special section for debuginfo extraction
- LDFLAGS="$LDFLAGS -Wl,--build-id"
- EXTRA_KLDFLAGS="$EXTRA_KLDFLAGS -Wl,--build-id"
- AS_IF([test "x$enable_server" != xno], [
- AC_MSG_WARN([Disabling server (not supported for $lb_cv_cross).])
- enable_server="no"
- ])
- AS_IF([test "x$enable_mpitests" != xno], [
- AC_MSG_WARN([Disabling MPI tests (not supported for $lb_cv_cross).])
- enable_mpitests="no"
- ])
-])
-AC_SUBST(CROSS_VARS)
-AC_SUBST(CROSS_PATH)
-])
-
-#