diff mbox

[i-g-t] benchmarks/gem_busy: Fix compile error

Message ID 1473173741-9345-1-git-send-email-derek.j.morton@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Derek Morton Sept. 6, 2016, 2:55 p.m. UTC
The benchmark was failing with:
gem_busy.c:158:8: error: implicit declaration of function 'intel_gen'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]
gen = intel_gen(intel_get_drm_devid(fd));

The root cause was due to the local lib directory not being specified
in benchmarks/Android.mk, resulting in intel_chipset.h from drm being
used instead.

This patch adds the lib path to the LOCAL_C_INCLUDES

Signed-off-by: Derek Morton <derek.j.morton@intel.com>
---
 benchmarks/Android.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Marius Vlad Sept. 7, 2016, 10:53 a.m. UTC | #1
Applied. Thanks!
On Tue, Sep 06, 2016 at 03:55:41PM +0100, Derek Morton wrote:
> The benchmark was failing with:
> gem_busy.c:158:8: error: implicit declaration of function 'intel_gen'
> is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> gen = intel_gen(intel_get_drm_devid(fd));
> 
> The root cause was due to the local lib directory not being specified
> in benchmarks/Android.mk, resulting in intel_chipset.h from drm being
> used instead.
> 
> This patch adds the lib path to the LOCAL_C_INCLUDES
> 
> Signed-off-by: Derek Morton <derek.j.morton@intel.com>
> ---
>  benchmarks/Android.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
> index 147f5db..c0fa09f 100644
> --- a/benchmarks/Android.mk
> +++ b/benchmarks/Android.mk
> @@ -1,6 +1,7 @@
>  LOCAL_PATH := $(call my-dir)
>  
>  include $(LOCAL_PATH)/Makefile.sources
> +IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
>  
>  #================#
>  
> @@ -9,6 +10,7 @@ define add_benchmark
>  
>      LOCAL_SRC_FILES := $1.c
>  
> +    LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES}
>      LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
>      LOCAL_CFLAGS += -DANDROID -UNDEBUG -include "check-ndebug.h"
>      LOCAL_CFLAGS += -std=gnu99
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index 147f5db..c0fa09f 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -1,6 +1,7 @@ 
 LOCAL_PATH := $(call my-dir)
 
 include $(LOCAL_PATH)/Makefile.sources
+IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
 
 #================#
 
@@ -9,6 +10,7 @@  define add_benchmark
 
     LOCAL_SRC_FILES := $1.c
 
+    LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES}
     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
     LOCAL_CFLAGS += -DANDROID -UNDEBUG -include "check-ndebug.h"
     LOCAL_CFLAGS += -std=gnu99