All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android
@ 2015-06-15 14:49 Derek Morton
  2015-06-15 15:30 ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Derek Morton @ 2015-06-15 14:49 UTC (permalink / raw)
  To: intel-gfx; +Cc: thomas.wood

Disable the tools / demo code that do not currently build
for android until they can be fixed.

Affected tools / demos
intel_reg
intel_display_crc
intel_sprite_on

v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO
flag.

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

diff --git a/Android.mk b/Android.mk
index 1ab3e64..681d114 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,2 +1,2 @@
-include $(call all-named-subdir-makefiles, lib tests tools benchmarks demos)
+include $(call all-named-subdir-makefiles, lib tests tools benchmarks)
 
diff --git a/tools/Android.mk b/tools/Android.mk
index 39f4512..4be0032 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -37,10 +37,15 @@ endef
 
 skip_tools_list := \
     intel_framebuffer_dump \
+    intel_reg \
     intel_reg_dumper \
     intel_vga_read \
     intel_vga_write
 
+ifneq ("${ANDROID_HAS_CAIRO}", "1")
+    skip_tools_list += intel_display_crc
+endif
+
 tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
 
 $(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android
  2015-06-15 14:49 [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android Derek Morton
@ 2015-06-15 15:30 ` Jani Nikula
  2015-06-16 10:04   ` Morton, Derek J
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2015-06-15 15:30 UTC (permalink / raw)
  To: Derek Morton, intel-gfx; +Cc: thomas.wood

On Mon, 15 Jun 2015, Derek Morton <derek.j.morton@intel.com> wrote:
> Disable the tools / demo code that do not currently build
> for android until they can be fixed.
>
> Affected tools / demos
> intel_reg
> intel_display_crc
> intel_sprite_on

The simplest you can do to fix intel_reg is to have configure set up
HAVE_SYS_IO or similar and do this in the code:

diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 090cc25613b9..c1e1d5ed3f1c 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -28,7 +28,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/io.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -38,6 +37,19 @@
 
 #include "intel_reg_spec.h"
 
+#ifdef HAVE_SYS_IO
+#include <sys/io.h>
+#else
+static inline int _not_supported(void)
+{
+	fprintf(stderr, "portio-vga not supported\n");
+	return 0;
+}
+#define inb(port)		_not_supported()
+#define outb(value, port)	_not_supported()
+#define iopl(level)
+#endif
+
 struct config {
 	struct pci_device *pci_dev;
 	char *mmiofile;

I'm sure it could be made prettier, but this gets the job done.

BR,
Jani.


>
> v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO
> flag.
>
> Signed-off-by: Derek Morton <derek.j.morton@intel.com>
> ---
>  Android.mk       | 2 +-
>  tools/Android.mk | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Android.mk b/Android.mk
> index 1ab3e64..681d114 100644
> --- a/Android.mk
> +++ b/Android.mk
> @@ -1,2 +1,2 @@
> -include $(call all-named-subdir-makefiles, lib tests tools benchmarks demos)
> +include $(call all-named-subdir-makefiles, lib tests tools benchmarks)
>  
> diff --git a/tools/Android.mk b/tools/Android.mk
> index 39f4512..4be0032 100644
> --- a/tools/Android.mk
> +++ b/tools/Android.mk
> @@ -37,10 +37,15 @@ endef
>  
>  skip_tools_list := \
>      intel_framebuffer_dump \
> +    intel_reg \
>      intel_reg_dumper \
>      intel_vga_read \
>      intel_vga_write
>  
> +ifneq ("${ANDROID_HAS_CAIRO}", "1")
> +    skip_tools_list += intel_display_crc
> +endif
> +
>  tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
>  
>  $(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))
> -- 
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android
  2015-06-15 15:30 ` Jani Nikula
@ 2015-06-16 10:04   ` Morton, Derek J
  2015-07-16  8:44     ` Morton, Derek J
  0 siblings, 1 reply; 9+ messages in thread
From: Morton, Derek J @ 2015-06-16 10:04 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx; +Cc: Wood, Thomas

>
>
>-----Original Message-----
>From: Jani Nikula [mailto:jani.nikula@linux.intel.com] 
>Sent: Monday, June 15, 2015 4:31 PM
>To: Morton, Derek J; intel-gfx@lists.freedesktop.org
>Cc: Wood, Thomas
>Subject: Re: [Intel-gfx] [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android
>
>On Mon, 15 Jun 2015, Derek Morton <derek.j.morton@intel.com> wrote:
>> Disable the tools / demo code that do not currently build for android 
>> until they can be fixed.
>>
>> Affected tools / demos
>> intel_reg
>> intel_display_crc
>> intel_sprite_on
>
>The simplest you can do to fix intel_reg is to have configure set up HAVE_SYS_IO or similar and do this in the code:
>
>diff --git a/tools/intel_reg.c b/tools/intel_reg.c index 090cc25613b9..c1e1d5ed3f1c 100644
>--- a/tools/intel_reg.c
>+++ b/tools/intel_reg.c
>@@ -28,7 +28,6 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>-#include <sys/io.h>
> #include <sys/stat.h>
> #include <sys/types.h>
> #include <unistd.h>
>@@ -38,6 +37,19 @@
> 
> #include "intel_reg_spec.h"
> 
>+#ifdef HAVE_SYS_IO
>+#include <sys/io.h>
>+#else
>+static inline int _not_supported(void)
>+{
>+	fprintf(stderr, "portio-vga not supported\n");
>+	return 0;
>+}
>+#define inb(port)		_not_supported()
>+#define outb(value, port)	_not_supported()
>+#define iopl(level)
>+#endif
>+
> struct config {
> 	struct pci_device *pci_dev;
> 	char *mmiofile;
>
>I'm sure it could be made prettier, but this gets the job done.
>
>BR,
>Jani.
>
>

I tried this but just hit another problem. The android make files assume  1:1 between source files and compiled binaries. Intel_reg has several source files so the extra files do not get built and it fails to link.

In the interests of keeping patches small and simple I would like to just keep this one as is so the android build no longer fails and try to fix intel_reg later as a separate patch.

//Derek

>>
>> v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO 
>> flag.
>>
>> Signed-off-by: Derek Morton <derek.j.morton@intel.com>
>> ---
>>  Android.mk       | 2 +-
>>  tools/Android.mk | 5 +++++
>>  2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/Android.mk b/Android.mk
>> index 1ab3e64..681d114 100644
>> --- a/Android.mk
>> +++ b/Android.mk
>> @@ -1,2 +1,2 @@
>> -include $(call all-named-subdir-makefiles, lib tests tools benchmarks 
>> demos)
>> +include $(call all-named-subdir-makefiles, lib tests tools 
>> +benchmarks)
>>  
>> diff --git a/tools/Android.mk b/tools/Android.mk index 
>> 39f4512..4be0032 100644
>> --- a/tools/Android.mk
>> +++ b/tools/Android.mk
>> @@ -37,10 +37,15 @@ endef
>>  
>>  skip_tools_list := \
>>      intel_framebuffer_dump \
>> +    intel_reg \
>>      intel_reg_dumper \
>>      intel_vga_read \
>>      intel_vga_write
>>  
>> +ifneq ("${ANDROID_HAS_CAIRO}", "1")
>> +    skip_tools_list += intel_display_crc endif
>> +
>>  tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
>>  
>>  $(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))
>> --
>> 1.9.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>--
>Jani Nikula, Intel Open Source Technology Center
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android
  2015-06-16 10:04   ` Morton, Derek J
@ 2015-07-16  8:44     ` Morton, Derek J
  2015-07-16 11:07       ` [PATCH i-g-t 0/2] Enabling intel_reg on Android Thomas Wood
  0 siblings, 1 reply; 9+ messages in thread
From: Morton, Derek J @ 2015-07-16  8:44 UTC (permalink / raw)
  To: Morton, Derek J, Jani Nikula, intel-gfx; +Cc: Wood, Thomas

Bump

Can this patch be merged? It only affects android and it only disables tools that fail to build anyway. Fixing the broken tools for android require non trivial fixes so need to be addressed as separate patches. This patch is required to allow the other tools to build for android in the meantime.

//Derek

>
>
>-----Original Message-----
>From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Morton, Derek J
>Sent: Tuesday, June 16, 2015 11:04 AM
>To: Jani Nikula; intel-gfx@lists.freedesktop.org
>Cc: Wood, Thomas
>Subject: Re: [Intel-gfx] [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android
>
>>
>>
>>-----Original Message-----
>>From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>>Sent: Monday, June 15, 2015 4:31 PM
>>To: Morton, Derek J; intel-gfx@lists.freedesktop.org
>>Cc: Wood, Thomas
>>Subject: Re: [Intel-gfx] [PATCH i-g-t v2] Android.mk: Disable tools 
>>that do not build for android
>>
>>On Mon, 15 Jun 2015, Derek Morton <derek.j.morton@intel.com> wrote:
>>> Disable the tools / demo code that do not currently build for android 
>>> until they can be fixed.
>>>
>>> Affected tools / demos
>>> intel_reg
>>> intel_display_crc
>>> intel_sprite_on
>>
>>The simplest you can do to fix intel_reg is to have configure set up HAVE_SYS_IO or similar and do this in the code:
>>
>>diff --git a/tools/intel_reg.c b/tools/intel_reg.c index 
>>090cc25613b9..c1e1d5ed3f1c 100644
>>--- a/tools/intel_reg.c
>>+++ b/tools/intel_reg.c
>>@@ -28,7 +28,6 @@
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <string.h>
>>-#include <sys/io.h>
>> #include <sys/stat.h>
>> #include <sys/types.h>
>> #include <unistd.h>
>>@@ -38,6 +37,19 @@
>> 
>> #include "intel_reg_spec.h"
>> 
>>+#ifdef HAVE_SYS_IO
>>+#include <sys/io.h>
>>+#else
>>+static inline int _not_supported(void) {
>>+	fprintf(stderr, "portio-vga not supported\n");
>>+	return 0;
>>+}
>>+#define inb(port)		_not_supported()
>>+#define outb(value, port)	_not_supported()
>>+#define iopl(level)
>>+#endif
>>+
>> struct config {
>> 	struct pci_device *pci_dev;
>> 	char *mmiofile;
>>
>>I'm sure it could be made prettier, but this gets the job done.
>>
>>BR,
>>Jani.
>>
>>
>
>I tried this but just hit another problem. The android make files assume  1:1 between source files and compiled binaries. Intel_reg has several source files so the extra files do not get built and it fails to link.
>
>In the interests of keeping patches small and simple I would like to just keep this one as is so the android build no longer fails and try to fix intel_reg later as a separate patch.
>
>//Derek
>
>>>
>>> v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO 
>>> flag.
>>>
>>> Signed-off-by: Derek Morton <derek.j.morton@intel.com>
>>> ---
>>>  Android.mk       | 2 +-
>>>  tools/Android.mk | 5 +++++
>>>  2 files changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Android.mk b/Android.mk
>>> index 1ab3e64..681d114 100644
>>> --- a/Android.mk
>>> +++ b/Android.mk
>>> @@ -1,2 +1,2 @@
>>> -include $(call all-named-subdir-makefiles, lib tests tools 
>>> benchmarks
>>> demos)
>>> +include $(call all-named-subdir-makefiles, lib tests tools
>>> +benchmarks)
>>>  
>>> diff --git a/tools/Android.mk b/tools/Android.mk index
>>> 39f4512..4be0032 100644
>>> --- a/tools/Android.mk
>>> +++ b/tools/Android.mk
>>> @@ -37,10 +37,15 @@ endef
>>>  
>>>  skip_tools_list := \
>>>      intel_framebuffer_dump \
>>> +    intel_reg \
>>>      intel_reg_dumper \
>>>      intel_vga_read \
>>>      intel_vga_write
>>>  
>>> +ifneq ("${ANDROID_HAS_CAIRO}", "1")
>>> +    skip_tools_list += intel_display_crc endif
>>> +
>>>  tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
>>>  
>>>  $(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))
>>> --
>>> 1.9.1
>>>
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>>--
>>Jani Nikula, Intel Open Source Technology Center
>>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH i-g-t 0/2] Enabling intel_reg on Android
  2015-07-16  8:44     ` Morton, Derek J
@ 2015-07-16 11:07       ` Thomas Wood
  2015-07-16 11:07         ` [PATCH i-g-t 1/2] intel_reg: support platforms without sys/io.h Thomas Wood
  2015-07-16 11:07         ` [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources Thomas Wood
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Wood @ 2015-07-16 11:07 UTC (permalink / raw)
  To: intel-gfx

intel_reg replaces various other register tools, so these patches attempt to
enable building it on Android platforms.

Thomas Wood (2):
  intel_reg: support platforms without sys/io.h
  tools/Android.mk: add any extra program sources

 configure.ac      |  2 +-
 tools/Android.mk  |  4 ++--
 tools/intel_reg.c | 17 ++++++++++++++++-
 3 files changed, 19 insertions(+), 4 deletions(-)

-- 
2.4.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH i-g-t 1/2] intel_reg: support platforms without sys/io.h
  2015-07-16 11:07       ` [PATCH i-g-t 0/2] Enabling intel_reg on Android Thomas Wood
@ 2015-07-16 11:07         ` Thomas Wood
  2015-07-16 11:07         ` [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources Thomas Wood
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Wood @ 2015-07-16 11:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

Based on an idea from Jani Nikula.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 configure.ac      |  2 +-
 tools/intel_reg.c | 17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f3603c1..3770b2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,7 @@ AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" = xyes])
 
 # Checks for functions, headers, structures, etc.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h libgen.h])
+AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h libgen.h sys/io.h])
 AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT
 		  #include <sys/sysinfo.h>
 		  ])
diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 090cc25..190aa5b 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -28,7 +28,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/io.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -38,6 +37,22 @@
 
 #include "intel_reg_spec.h"
 
+
+#ifdef HAVE_SYS_IO_H
+#include <sys/io.h>
+#else
+
+static inline int _not_supported(void)
+{
+       fprintf(stderr, "portio-vga not supported\n");
+       exit(EXIT_FAILURE);
+}
+#define inb(port)              _not_supported()
+#define outb(value, port)      _not_supported()
+#define iopl(level)
+
+#endif /* HAVE_SYS_IO_H */
+
 struct config {
 	struct pci_device *pci_dev;
 	char *mmiofile;
-- 
2.4.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources
  2015-07-16 11:07       ` [PATCH i-g-t 0/2] Enabling intel_reg on Android Thomas Wood
  2015-07-16 11:07         ` [PATCH i-g-t 1/2] intel_reg: support platforms without sys/io.h Thomas Wood
@ 2015-07-16 11:07         ` Thomas Wood
  2015-07-16 14:13           ` Morton, Derek J
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Wood @ 2015-07-16 11:07 UTC (permalink / raw)
  To: intel-gfx

Cc: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 tools/Android.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/Android.mk b/tools/Android.mk
index 39f4512..f7dc3bb 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -1,13 +1,13 @@
 LOCAL_PATH := $(call my-dir)
 
-include $(LOCAL_PATH)/Makefile.sources
+include ./$(LOCAL_PATH)/Makefile.sources
 
 #================#
 
 define add_tool
     include $(CLEAR_VARS)
 
-    LOCAL_SRC_FILES := $1.c
+    LOCAL_SRC_FILES := $1.c $($(1)_SOURCES)
 
     LOCAL_CFLAGS += -DHAVE_TERMIOS_H
     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
-- 
2.4.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources
  2015-07-16 11:07         ` [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources Thomas Wood
@ 2015-07-16 14:13           ` Morton, Derek J
  2015-07-16 15:23             ` Thomas Wood
  0 siblings, 1 reply; 9+ messages in thread
From: Morton, Derek J @ 2015-07-16 14:13 UTC (permalink / raw)
  To: Wood, Thomas, intel-gfx

Hi Thomas,

I tried these patches on Android. They worked with some modifications. See comments below.

//Derek

>
>
>-----Original Message-----
>From: Wood, Thomas 
>Sent: Thursday, July 16, 2015 12:08 PM
>To: intel-gfx@lists.freedesktop.org
>Cc: Morton, Derek J
>Subject: [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources
>
>Cc: Derek Morton <derek.j.morton@intel.com>
>Signed-off-by: Thomas Wood <thomas.wood@intel.com>
>---
> tools/Android.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/tools/Android.mk b/tools/Android.mk index 39f4512..f7dc3bb 100644
>--- a/tools/Android.mk
>+++ b/tools/Android.mk
>@@ -1,13 +1,13 @@
> LOCAL_PATH := $(call my-dir)
> 
>-include $(LOCAL_PATH)/Makefile.sources
>+include ./$(LOCAL_PATH)/Makefile.sources

$(LOCAL_PATH) is an absolute path so putting ./ in front of it breaks things.

> 
> #================#
> 
> define add_tool
>     include $(CLEAR_VARS)
> 
>-    LOCAL_SRC_FILES := $1.c
>+    LOCAL_SRC_FILES := $1.c $($(1)_SOURCES)

This causes duplication errors as $1.c will also be in $($(1)_SOURCES). However $($(1)_SOURCES) on its own does not work either as it is not defined for all targets.
I ended up with:

ifeq ($($(1)_SOURCES),)
    LOCAL_SRC_FILES := $1.c
else
    LOCAL_SRC_FILES := $($(1)_SOURCES)
endif

> 
>     LOCAL_CFLAGS += -DHAVE_TERMIOS_H
>     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
>--
>2.4.3
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources
  2015-07-16 14:13           ` Morton, Derek J
@ 2015-07-16 15:23             ` Thomas Wood
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Wood @ 2015-07-16 15:23 UTC (permalink / raw)
  To: Morton, Derek J; +Cc: intel-gfx

On 16 July 2015 at 15:13, Morton, Derek J <derek.j.morton@intel.com> wrote:
>
> Hi Thomas,
>
> I tried these patches on Android. They worked with some modifications. See comments below.
>
> //Derek
>
> >
> >
> >-----Original Message-----
> >From: Wood, Thomas
> >Sent: Thursday, July 16, 2015 12:08 PM
> >To: intel-gfx@lists.freedesktop.org
> >Cc: Morton, Derek J
> >Subject: [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources
> >
> >Cc: Derek Morton <derek.j.morton@intel.com>
> >Signed-off-by: Thomas Wood <thomas.wood@intel.com>
> >---
> > tools/Android.mk | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/tools/Android.mk b/tools/Android.mk index 39f4512..f7dc3bb 100644
> >--- a/tools/Android.mk
> >+++ b/tools/Android.mk
> >@@ -1,13 +1,13 @@
> > LOCAL_PATH := $(call my-dir)
> >
> >-include $(LOCAL_PATH)/Makefile.sources
> >+include ./$(LOCAL_PATH)/Makefile.sources
>
> $(LOCAL_PATH) is an absolute path so putting ./ in front of it breaks things.

This was just for some (limited) local testing, so wasn't supposed to
be in the patch anyway.


>
> >
> > #================#
> >
> > define add_tool
> >     include $(CLEAR_VARS)
> >
> >-    LOCAL_SRC_FILES := $1.c
> >+    LOCAL_SRC_FILES := $1.c $($(1)_SOURCES)
>
> This causes duplication errors as $1.c will also be in $($(1)_SOURCES). However $($(1)_SOURCES) on its own does not work either as it is not defined for all targets.
> I ended up with:

Looks good; I'll make the changes and push the patches.

>
> ifeq ($($(1)_SOURCES),)
>     LOCAL_SRC_FILES := $1.c
> else
>     LOCAL_SRC_FILES := $($(1)_SOURCES)
> endif
>
> >
> >     LOCAL_CFLAGS += -DHAVE_TERMIOS_H
> >     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
> >--
> >2.4.3
> >
> >
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-07-16 15:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 14:49 [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android Derek Morton
2015-06-15 15:30 ` Jani Nikula
2015-06-16 10:04   ` Morton, Derek J
2015-07-16  8:44     ` Morton, Derek J
2015-07-16 11:07       ` [PATCH i-g-t 0/2] Enabling intel_reg on Android Thomas Wood
2015-07-16 11:07         ` [PATCH i-g-t 1/2] intel_reg: support platforms without sys/io.h Thomas Wood
2015-07-16 11:07         ` [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources Thomas Wood
2015-07-16 14:13           ` Morton, Derek J
2015-07-16 15:23             ` Thomas Wood

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.