From patchwork Wed Apr 19 11:01:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Hiler X-Patchwork-Id: 9687285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CEEA8602DC for ; Wed, 19 Apr 2017 11:02:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFE14283F4 for ; Wed, 19 Apr 2017 11:02:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B447C283FE; Wed, 19 Apr 2017 11:02:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A8BDC283F4 for ; Wed, 19 Apr 2017 11:02:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BB036E2C8; Wed, 19 Apr 2017 11:02:34 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A9456E2C8 for ; Wed, 19 Apr 2017 11:02:32 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2017 04:02:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,221,1488873600"; d="scan'208";a="89670209" Received: from ahiler-desk.igk.intel.com ([172.28.171.131]) by orsmga005.jf.intel.com with ESMTP; 19 Apr 2017 04:02:31 -0700 From: Arkadiusz Hiler To: intel-gfx@lists.freedesktop.org Date: Wed, 19 Apr 2017 13:01:51 +0200 Message-Id: <20170419110155.6828-10-arkadiusz.hiler@intel.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170419110155.6828-1-arkadiusz.hiler@intel.com> References: <20170419110155.6828-1-arkadiusz.hiler@intel.com> Organization: Intel Technology Poland sp. z o.o. - KRS 101882 - ul. Slowackiego 173, 80-298 Gdansk Subject: [Intel-gfx] [PATCH i-g-t 09/13] Android.mk: Fix libkmod use X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP On Android libkmod.h is nested under libkmod directory, so we should include appropriately. Also we need to link with it. Signed-off-by: Arkadiusz Hiler --- benchmarks/Android.mk | 2 ++ lib/Android.mk | 1 + lib/igt_kmod.h | 4 ++++ tests/Android.mk | 4 ++-- tools/Android.mk | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk index a790ec7..fa9eec6 100644 --- a/benchmarks/Android.mk +++ b/benchmarks/Android.mk @@ -18,6 +18,7 @@ define add_benchmark LOCAL_CFLAGS += -Wno-error=return-type # Excessive complaining for established cases. Rely on the Linux version warnings. LOCAL_CFLAGS += -Wno-sign-compare + LOCAL_LDFLAGS += -lkmod LOCAL_MODULE := $1_benchmark LOCAL_MODULE_TAGS := optional @@ -26,6 +27,7 @@ define add_benchmark LOCAL_STATIC_LIBRARIES := libintel_gpu_tools LOCAL_SHARED_LIBRARIES := libpciaccess \ + libkmod \ libdrm \ libdrm_intel diff --git a/lib/Android.mk b/lib/Android.mk index eb72f84..0596e4a 100644 --- a/lib/Android.mk +++ b/lib/Android.mk @@ -29,6 +29,7 @@ LOCAL_CFLAGS += -std=gnu99 -UNDEBUG LOCAL_MODULE:= libintel_gpu_tools LOCAL_SHARED_LIBRARIES := libpciaccess \ + libkmod \ libdrm \ libdrm_intel diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h index fd307a4..6a7584f 100644 --- a/lib/igt_kmod.h +++ b/lib/igt_kmod.h @@ -24,7 +24,11 @@ #ifndef IGT_KMOD_H #define IGT_KMOD_H +#ifdef ANDROID +#include +#else #include +#endif #include "igt_aux.h" diff --git a/tests/Android.mk b/tests/Android.mk index c67ddbd..b664dff 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -19,7 +19,7 @@ define add_test LOCAL_MODULE_TAGS := optional # ask linker to define a specific symbol; we use this to identify IGT tests - LOCAL_LDFLAGS := -Wl,--defsym=$2=0 + LOCAL_LDFLAGS := -Wl,--defsym=$2=0 -lkmod LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt include $(BUILD_EXECUTABLE) @@ -45,7 +45,7 @@ IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm # set local libraries IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools -IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel +IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libkmod libdrm libdrm_intel # handle cairo requirements if it is enabled ifeq ("${ANDROID_HAS_CAIRO}", "1") diff --git a/tools/Android.mk b/tools/Android.mk index 0602e8c..a8e649b 100644 --- a/tools/Android.mk +++ b/tools/Android.mk @@ -23,6 +23,7 @@ define add_tool LOCAL_CFLAGS += -Wno-error=return-type # Excessive complaining for established cases. Rely on the Linux version warnings. LOCAL_CFLAGS += -Wno-sign-compare + LOCAL_LDFLAGS += -lkmod ifeq ($($(1)_LDFLAGS),) else LOCAL_LDFLAGS += $($(1)_LDFLAGS) @@ -38,6 +39,7 @@ define add_tool LOCAL_STATIC_LIBRARIES := libintel_gpu_tools LOCAL_SHARED_LIBRARIES := libpciaccess \ + libkmod \ libdrm \ libdrm_intel