From 831a47196dd4d8afbdd967353d689bf8aed4f3e6 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 10 Dec 2013 09:23:44 +0100 Subject: [PATCH] lib: Add host platform to version string This is import on systems where we compile 32bit tests that run on 64bit platforms. Signed-off-by: Daniel Vetter --- configure.ac | 2 ++ lib/drmtest.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 04035299..b43f45c7 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_CONFIG_AUX_DIR([build-aux]) AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_GNU_SOURCE +AC_CANONICAL_HOST AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_PATH_PYTHON([3],, [:]) @@ -185,6 +186,7 @@ if test "x$BUILD_TESTS" = xyes; then AC_DEFINE(BUILD_TESTS, 1, [Build tests]) fi AM_CONDITIONAL(BUILD_TESTS, [test "x$BUILD_TESTS" = xyes]) +AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform]) AC_CONFIG_FILES([ Makefile diff --git a/lib/drmtest.c b/lib/drmtest.c index 9efe2bd1..61417f7b 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -806,7 +806,8 @@ static void print_version(void) if (list_subtests) return; - fprintf(stdout, "IGT-Version: %s-%s\n", PACKAGE_VERSION, IGT_GIT_SHA1); + fprintf(stdout, "IGT-Version: %s-%s (%s)\n", PACKAGE_VERSION, + IGT_GIT_SHA1, TARGET_CPU_PLATFORM); } static void print_usage(const char *command_str, const char *help_str,