From: Daniel Stone <daniels@collabora.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] build: Disable x86-specific utilities on non-x86
Date: Mon, 25 Jan 2016 19:41:48 +0000 [thread overview]
Message-ID: <1453750908-10825-1-git-send-email-daniels@collabora.com> (raw)
Some bits can't be built on non-x86 architectures, mostly because they
require x86-specific assembly primitives. Disable these by default on
non-x86 architectures.
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
Makefile.am | 10 +++++++---
configure.ac | 37 ++++++++++++++++++++++++++++---------
2 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4f71a3a..6016862 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,8 +21,13 @@
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
-SUBDIRS = lib man tools scripts benchmarks demos overlay
+SUBDIRS = lib man tools scripts benchmarks
+if BUILD_TESTS
+SUBDIRS += tests
+endif
+
+if BUILD_X86
if BUILD_ASSEMBLER
SUBDIRS += assembler
endif
@@ -31,8 +36,7 @@ if BUILD_SHADER_DEBUGGER
SUBDIRS += debugger
endif
-if BUILD_TESTS
-SUBDIRS += tests
+SUBDIRS += overlay demos benchmarks
endif
SUBDIRS += docs
diff --git a/configure.ac b/configure.ac
index ddfe696..ecbfacd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_GNU_SOURCE
AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.12 foreign subdir-objects dist-bzip2])
AM_PATH_PYTHON([3],, [:])
@@ -87,8 +88,31 @@ AC_SUBST(ASSEMBLER_WARN_CFLAGS)
PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.64 libdrm])
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
-PKG_CHECK_MODULES(OVERLAY_XVLIB, [xv x11 xext dri2proto >= 2.6], enable_overlay_xvlib=yes, enable_overlay_xvlib=no)
-PKG_CHECK_MODULES(OVERLAY_XLIB, [cairo-xlib dri2proto >= 2.6], enable_overlay_xlib=yes, enable_overlay_xlib=no)
+
+case "$target_cpu" in
+ x86*)
+ build_x86="yes"
+ ;;
+ *)
+ build_x86="no"
+ ;;
+esac
+
+if test x"$build_x86" = xyes; then
+ PKG_CHECK_MODULES(OVERLAY_XVLIB, [xv x11 xext dri2proto >= 2.6], enable_overlay_xvlib=yes, enable_overlay_xvlib=no)
+ PKG_CHECK_MODULES(OVERLAY_XLIB, [cairo-xlib dri2proto >= 2.6], enable_overlay_xlib=yes, enable_overlay_xlib=no)
+ AS_IF([test x"$LEX" != "x:" -a x"$YACC" != xyacc],
+ [enable_assembler=yes],
+ [enable_assembler=no])
+else
+ enable_overlay_xvlib="no"
+ enable_overlay_xlib="no"
+ enable_assembler="no"
+ BUILD_SHADER_DEBUGGER="no"
+fi
+AM_CONDITIONAL(BUILD_X86, [test "x$build_x86" = xyes])
+
+AM_CONDITIONAL(BUILD_ASSEMBLER, [test "x$enable_assembler" = xyes])
AM_CONDITIONAL(BUILD_OVERLAY_XVLIB, [test "x$enable_overlay_xvlib" = xyes])
AM_CONDITIONAL(BUILD_OVERLAY_XLIB, [test "x$enable_overlay_xlib" = xyes])
@@ -109,12 +133,6 @@ if test x"$udev" = xyes; then
fi
PKG_CHECK_MODULES(GLIB, glib-2.0)
-# can we build the assembler?
-AS_IF([test x"$LEX" != "x:" -a x"$YACC" != xyacc],
- [enable_assembler=yes],
- [enable_assembler=no])
-AM_CONDITIONAL(BUILD_ASSEMBLER, [test "x$enable_assembler" = xyes])
-
# -----------------------------------------------------------------------------
# Configuration options
# -----------------------------------------------------------------------------
@@ -134,7 +152,7 @@ AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
# Define a configure option for the shader debugger
AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger],
[Enable shader debugging support [autodetected]]),
- [BUILD_SHADER_DEBUGGER="$enableval"], [BUILD_SHADER_DEBUGGER=auto])
+ [BUILD_SHADER_DEBUGGER="$enableval"], [BUILD_SHADER_DEBUGGER=$build_x86])
# Shader debugger depends on python3, intel-genasm and objcopy
if test "x$BUILD_SHADER_DEBUGGER" != xno; then
@@ -266,6 +284,7 @@ echo " • Tools:"
echo " Assembler : ${enable_assembler}"
echo " Debugger : ${enable_debugger}"
echo " Overlay : X: ${enable_overlay_xlib}, Xv: ${enable_overlay_xvlib}"
+echo " x86-specific tools : ${build_x86}"
echo ""
echo " • API-Documentation : ${enable_gtk_doc}"
echo ""
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
reply other threads:[~2016-01-25 19:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453750908-10825-1-git-send-email-daniels@collabora.com \
--to=daniels@collabora.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.