* [PATH 0/6] Misc build fixes
@ 2015-01-29 18:47 Emil Velikov
2015-01-29 18:47 ` [PATCH 1/6] util: add WARN_CFLAGS, rename the c*flags vars Emil Velikov
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 18:47 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
Hello all,
It's time for another Android fueled round of fixes.
Mostly trivial and self explanatory patches enough to get things
building (rather quietly) on Android 5, x86_64
The series can be found at in branch for-android at
https://github.com/evelikov/libdrm/
Cheers,
Emil
freedreno/Android.mk | 3 ---
intel/Android.mk | 1 -
libdrm.h | 2 +-
nouveau/Android.mk | 3 ---
radeon/Android.mk | 3 ---
tests/modetest/Makefile.am | 6 +++---
tests/util/Makefile.am | 13 +++++++------
xf86drm.c | 4 ++--
8 files changed, 13 insertions(+), 22 deletions(-)
Chih-Wei Huang (1):
android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES
Emil Velikov (5):
util: add WARN_CFLAGS, rename the c*flags vars
modetest: move includes into AM_CPPFLAGS
libdrm: fix the Android 64bit build
drmOpenDevice: silence compiler warning
drmGetStats: silence compiler warning
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/6] util: add WARN_CFLAGS, rename the c*flags vars
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
@ 2015-01-29 18:47 ` Emil Velikov
2015-01-29 18:47 ` [PATCH 2/6] modetest: move includes into AM_CPPFLAGS Emil Velikov
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 18:47 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/util/Makefile.am | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/util/Makefile.am b/tests/util/Makefile.am
index f8e0b17..aaaf932 100644
--- a/tests/util/Makefile.am
+++ b/tests/util/Makefile.am
@@ -1,13 +1,14 @@
include Makefile.sources
-noinst_LTLIBRARIES = \
- libutil.la
-
-libutil_la_CPPFLAGS = \
+AM_CPPFLAGS = \
-I$(top_srcdir)/include/drm \
-I$(top_srcdir)
-libutil_la_CFLAGS = \
- $(CAIRO_CFLAGS)
+AM_CFLAGS = \
+ $(CAIRO_CFLAGS) \
+ $(WARN_CFLAGS)
+
+noinst_LTLIBRARIES = \
+ libutil.la
libutil_la_SOURCES = $(UTIL_FILES)
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/6] modetest: move includes into AM_CPPFLAGS
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
2015-01-29 18:47 ` [PATCH 1/6] util: add WARN_CFLAGS, rename the c*flags vars Emil Velikov
@ 2015-01-29 18:47 ` Emil Velikov
2015-01-29 18:47 ` [PATCH 3/6] libdrm: fix the Android 64bit build Emil Velikov
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 18:47 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/modetest/Makefile.am | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am
index 40dad3e..a8b9a3a 100644
--- a/tests/modetest/Makefile.am
+++ b/tests/modetest/Makefile.am
@@ -1,12 +1,12 @@
include Makefile.sources
-AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS))
-
-AM_CFLAGS += \
+AM_CPPFLAGS = \
-I$(top_srcdir)/include/drm \
-I$(top_srcdir)/tests \
-I$(top_srcdir)
+AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS))
+
if HAVE_INSTALL_TESTS
bin_PROGRAMS = \
modetest
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/6] libdrm: fix the Android 64bit build
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
2015-01-29 18:47 ` [PATCH 1/6] util: add WARN_CFLAGS, rename the c*flags vars Emil Velikov
2015-01-29 18:47 ` [PATCH 2/6] modetest: move includes into AM_CPPFLAGS Emil Velikov
@ 2015-01-29 18:47 ` Emil Velikov
2015-01-29 19:00 ` Stéphane Marchesin
2015-01-29 18:47 ` [PATCH 4/6] drmOpenDevice: silence compiler warning Emil Velikov
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 18:47 UTC (permalink / raw)
To: dri-devel; +Cc: Chih-Wei Huang, emil.l.velikov
With 64bit bionic mmap now handles 64bit offset, thus we no longer
need the __mmap2 trick.
Fix from Chih-Wei Huang, over at the google forums.
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
libdrm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdrm.h b/libdrm.h
index acfada5..6c3cd59 100644
--- a/libdrm.h
+++ b/libdrm.h
@@ -45,7 +45,7 @@
#include <sys/mman.h>
-#if defined(ANDROID)
+#if defined(ANDROID) && !defined(__LP64__)
#include <errno.h> /* for EINVAL */
extern void *__mmap2(void *, size_t, int, int, int, size_t);
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/6] drmOpenDevice: silence compiler warning
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
` (2 preceding siblings ...)
2015-01-29 18:47 ` [PATCH 3/6] libdrm: fix the Android 64bit build Emil Velikov
@ 2015-01-29 18:47 ` Emil Velikov
2015-01-29 18:47 ` [PATCH 5/6] drmGetStats: " Emil Velikov
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 18:47 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
Under 64bit Android the compiler throws a -Wsign-compare warning.
Typecast the variable dev to silence the build.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
xf86drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xf86drm.c b/xf86drm.c
index 345325a..b41c1d8 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -394,7 +394,7 @@ wait_for_udev:
/* Check if the device node is not what we expect it to be, and recreate it
* and try again if so.
*/
- if (st.st_rdev != dev) {
+ if (st.st_rdev != (dev_t)dev) {
if (!isroot)
return DRM_ERR_NOT_ROOT;
remove(buf);
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/6] drmGetStats: silence compiler warning
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
` (3 preceding siblings ...)
2015-01-29 18:47 ` [PATCH 4/6] drmOpenDevice: silence compiler warning Emil Velikov
@ 2015-01-29 18:47 ` Emil Velikov
2015-01-29 18:47 ` [PATCH 6/6] android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES Emil Velikov
2015-02-06 19:42 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
6 siblings, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 18:47 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
drm_stats_t::count is of type unsigned long, while i is an int. Make the
latter an unsigned int.
Spotted as -Wsign-compare warning while building under Android 5.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
xf86drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xf86drm.c b/xf86drm.c
index b41c1d8..cc79ab6 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -2213,7 +2213,7 @@ int drmGetClient(int fd, int idx, int *auth, int *pid, int *uid,
int drmGetStats(int fd, drmStatsT *stats)
{
drm_stats_t s;
- int i;
+ unsigned int i;
if (drmIoctl(fd, DRM_IOCTL_GET_STATS, &s))
return -errno;
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/6] android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
` (4 preceding siblings ...)
2015-01-29 18:47 ` [PATCH 5/6] drmGetStats: " Emil Velikov
@ 2015-01-29 18:47 ` Emil Velikov
2015-02-06 19:42 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
6 siblings, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 18:47 UTC (permalink / raw)
To: dri-devel; +Cc: Chih-Wei Huang, emil.l.velikov
From: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
---
freedreno/Android.mk | 3 ---
intel/Android.mk | 1 -
nouveau/Android.mk | 3 ---
radeon/Android.mk | 3 ---
4 files changed, 10 deletions(-)
diff --git a/freedreno/Android.mk b/freedreno/Android.mk
index 243a1e2..22520fb 100644
--- a/freedreno/Android.mk
+++ b/freedreno/Android.mk
@@ -24,7 +24,4 @@ LOCAL_CFLAGS := \
LOCAL_COPY_HEADERS := $(LIBDRM_FREEDRENO_H_FILES)
LOCAL_COPY_HEADERS_TO := freedreno
-LOCAL_SHARED_LIBRARIES := \
- libdrm
-
include $(BUILD_SHARED_LIBRARY)
diff --git a/intel/Android.mk b/intel/Android.mk
index f2f21b9..bf6e822 100644
--- a/intel/Android.mk
+++ b/intel/Android.mk
@@ -49,7 +49,6 @@ LOCAL_COPY_HEADERS := $(LIBDRM_INTEL_H_FILES)
LOCAL_COPY_HEADERS_TO := libdrm
LOCAL_SHARED_LIBRARIES := \
- libdrm \
libpciaccess
include $(BUILD_SHARED_LIBRARY)
diff --git a/nouveau/Android.mk b/nouveau/Android.mk
index 734fc21..93c9ec2 100644
--- a/nouveau/Android.mk
+++ b/nouveau/Android.mk
@@ -24,7 +24,4 @@ LOCAL_CFLAGS := \
LOCAL_COPY_HEADERS := $(LIBDRM_NOUVEAU_H_FILES)
LOCAL_COPY_HEADERS_TO := libdrm
-LOCAL_SHARED_LIBRARIES := \
- libdrm
-
include $(BUILD_SHARED_LIBRARY)
diff --git a/radeon/Android.mk b/radeon/Android.mk
index 9cba546..71c58bd 100644
--- a/radeon/Android.mk
+++ b/radeon/Android.mk
@@ -24,7 +24,4 @@ LOCAL_CFLAGS := \
LOCAL_COPY_HEADERS := $(LIBDRM_RADEON_H_FILES)
LOCAL_COPY_HEADERS_TO := libdrm
-LOCAL_SHARED_LIBRARIES := \
- libdrm
-
include $(BUILD_SHARED_LIBRARY)
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/6] libdrm: fix the Android 64bit build
2015-01-29 18:47 ` [PATCH 3/6] libdrm: fix the Android 64bit build Emil Velikov
@ 2015-01-29 19:00 ` Stéphane Marchesin
2015-01-29 19:22 ` Emil Velikov
0 siblings, 1 reply; 12+ messages in thread
From: Stéphane Marchesin @ 2015-01-29 19:00 UTC (permalink / raw)
To: Emil Velikov; +Cc: Chih-Wei Huang, dri-devel@lists.freedesktop.org
On Thu, Jan 29, 2015 at 10:47 AM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> With 64bit bionic mmap now handles 64bit offset, thus we no longer
> need the __mmap2 trick.
>
> Fix from Chih-Wei Huang, over at the google forums.
>
> Cc: Chih-Wei Huang <cwhuang@android-x86.org>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
> libdrm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libdrm.h b/libdrm.h
> index acfada5..6c3cd59 100644
> --- a/libdrm.h
> +++ b/libdrm.h
> @@ -45,7 +45,7 @@
>
> #include <sys/mman.h>
>
> -#if defined(ANDROID)
> +#if defined(ANDROID) && !defined(__LP64__)
> #include <errno.h> /* for EINVAL */
>
> extern void *__mmap2(void *, size_t, int, int, int, size_t);
It seems like you're be better off just using mmap64 instead of __mpap2?
Stéphane
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/6] libdrm: fix the Android 64bit build
2015-01-29 19:00 ` Stéphane Marchesin
@ 2015-01-29 19:22 ` Emil Velikov
0 siblings, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-01-29 19:22 UTC (permalink / raw)
To: Stéphane Marchesin
Cc: Chih-Wei Huang, emil.l.velikov, dri-devel@lists.freedesktop.org
On 29/01/15 19:00, Stéphane Marchesin wrote:
> On Thu, Jan 29, 2015 at 10:47 AM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> With 64bit bionic mmap now handles 64bit offset, thus we no longer
>> need the __mmap2 trick.
>>
>> Fix from Chih-Wei Huang, over at the google forums.
>>
>> Cc: Chih-Wei Huang <cwhuang@android-x86.org>
>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>> ---
>> libdrm.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libdrm.h b/libdrm.h
>> index acfada5..6c3cd59 100644
>> --- a/libdrm.h
>> +++ b/libdrm.h
>> @@ -45,7 +45,7 @@
>>
>> #include <sys/mman.h>
>>
>> -#if defined(ANDROID)
>> +#if defined(ANDROID) && !defined(__LP64__)
>> #include <errno.h> /* for EINVAL */
>>
>> extern void *__mmap2(void *, size_t, int, int, int, size_t);
>
> It seems like you're be better off just using mmap64 instead of __mpap2?
>
I was thinking about that but decided against it due to:
- For 64bit platforms - mmap64 maps directly to mmap [1].
- For other platforms (kitkat at least) mmap64 does a costly (according
to the man page) syscall (don't recall the name).
- Some systems may be lacking mmap64.
Quite a noobie on the topic so I might be completely wrong :)
Thanks
Emil
[1]
https://android.googlesource.com/platform/bionic.git/+/38fcbbb35a40c46e96b4df10d670d1c132910854%5E2%5E!/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] util: add missing include <string.h>
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
` (5 preceding siblings ...)
2015-01-29 18:47 ` [PATCH 6/6] android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES Emil Velikov
@ 2015-02-06 19:42 ` Emil Velikov
2015-02-06 19:42 ` [PATCH 2/2] util: silence pointer arithmetic warnings Emil Velikov
2015-02-06 19:54 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
6 siblings, 2 replies; 12+ messages in thread
From: Emil Velikov @ 2015-02-06 19:42 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
Required by strcmp, otherwise we'll error out of the build with the
following commit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/util/format.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/util/format.c b/tests/util/format.c
index c365ceb..52b3f97 100644
--- a/tests/util/format.c
+++ b/tests/util/format.c
@@ -29,6 +29,7 @@
#include <stdint.h>
#include <stdlib.h>
+#include <string.h>
#include <drm_fourcc.h>
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] util: silence pointer arithmetic warnings
2015-02-06 19:42 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
@ 2015-02-06 19:42 ` Emil Velikov
2015-02-06 19:54 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
1 sibling, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-02-06 19:42 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/util/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/util/Makefile.am b/tests/util/Makefile.am
index aaaf932..1d71c40 100644
--- a/tests/util/Makefile.am
+++ b/tests/util/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(CAIRO_CFLAGS) \
- $(WARN_CFLAGS)
+ $(filter-out -Wpointer-arith, $(WARN_CFLAGS))
+
noinst_LTLIBRARIES = \
libutil.la
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] util: add missing include <string.h>
2015-02-06 19:42 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
2015-02-06 19:42 ` [PATCH 2/2] util: silence pointer arithmetic warnings Emil Velikov
@ 2015-02-06 19:54 ` Emil Velikov
1 sibling, 0 replies; 12+ messages in thread
From: Emil Velikov @ 2015-02-06 19:54 UTC (permalink / raw)
To: dri-devel@lists.freedesktop.org; +Cc: emil.l.velikov
Grr... git send-email did not keep the fix of the patches :\
This one should be "PATCH 0.1/6" while "util: silence pointer arithmetic
warnings" - "PATCH 1.1/6".
Cheers,
Emil
On 06/02/15 19:42, Emil Velikov wrote:
> Required by strcmp, otherwise we'll error out of the build with the
> following commit.
>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
> tests/util/format.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/util/format.c b/tests/util/format.c
> index c365ceb..52b3f97 100644
> --- a/tests/util/format.c
> +++ b/tests/util/format.c
> @@ -29,6 +29,7 @@
>
> #include <stdint.h>
> #include <stdlib.h>
> +#include <string.h>
>
> #include <drm_fourcc.h>
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-02-06 19:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 18:47 [PATH 0/6] Misc build fixes Emil Velikov
2015-01-29 18:47 ` [PATCH 1/6] util: add WARN_CFLAGS, rename the c*flags vars Emil Velikov
2015-01-29 18:47 ` [PATCH 2/6] modetest: move includes into AM_CPPFLAGS Emil Velikov
2015-01-29 18:47 ` [PATCH 3/6] libdrm: fix the Android 64bit build Emil Velikov
2015-01-29 19:00 ` Stéphane Marchesin
2015-01-29 19:22 ` Emil Velikov
2015-01-29 18:47 ` [PATCH 4/6] drmOpenDevice: silence compiler warning Emil Velikov
2015-01-29 18:47 ` [PATCH 5/6] drmGetStats: " Emil Velikov
2015-01-29 18:47 ` [PATCH 6/6] android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES Emil Velikov
2015-02-06 19:42 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
2015-02-06 19:42 ` [PATCH 2/2] util: silence pointer arithmetic warnings Emil Velikov
2015-02-06 19:54 ` [PATCH 1/2] util: add missing include <string.h> Emil Velikov
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.