Skip to contentSkip to conversation

benchmarks/gem_busy: Fix compile error

PATCH Applied Derek Morton 2 participants 2 messages Sep 6, 2016 – Sep 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 benchmarks/gem_busy: Fix compile error

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

---
 benchmarks/Android.mk | 2 ++
 1 file changed, 2 insertions(+)
benchmarks/Android.mk +2 -0
index 147f5db..c0fa09f 100644
@@ -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
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Applied
#1 lore raw

Applied. Thanks!

Quoted 43 lines · Derek Morton

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

---
 benchmarks/Android.mk | 2 ++
 1 file changed, 2 insertions(+)
benchmarks/Android.mk +2 -0
index 147f5db..c0fa09f 100644
@@ -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
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx