4c085ddf54
As observed on UBPorts, hwcomposer implementation on Android 7 CAF (non-Nexus Qualcomm) devices has slight differences in employed structs, which makes them binary incompatible with AOSP headers. Halium 7.1 android-headers extracted from LineageOS include those modifications (e. g. https://github.com/Halium/android-headers/blob/halium-7.1/hardware/hwcomposer.h#L290), so it is enough to add QTI_BSP/QCOM_BSP to defines of programs utilizing those headers. In case of libhybris, only test_hwcomposer is affected so far on 7.1 (might be not true for Android 5.1/6!). This change avoids providing libhybris-7.1-caf package by building a separate binary of test_hwcomposer for affected devices.
55 lines
1.8 KiB
Diff
55 lines
1.8 KiB
Diff
From d1ba53c0eabdc706a19d83f5845a48012a6eb566 Mon Sep 17 00:00:00 2001
|
|
From: NeKit <nekit1000@gmail.com>
|
|
Date: Sat, 1 Dec 2018 00:02:52 +0100
|
|
Subject: [PATCH] test_hwcomposer: hack to build version for Android 7 CAF
|
|
devices
|
|
|
|
Android headers from LineageOS 14.1 include needed changes in structs,
|
|
which are conditionally activated by QTI_BSP define. By enabling that
|
|
define we can build a separate binary of test_hwcomposer which will
|
|
work on Android 7 CAF devices with Halium.
|
|
---
|
|
hybris/tests/Makefile.am | 27 +++++++++++++++++++++++++++
|
|
1 file changed, 27 insertions(+)
|
|
|
|
diff --git a/hybris/tests/Makefile.am b/hybris/tests/Makefile.am
|
|
index 242436b..2255694 100644
|
|
--- a/hybris/tests/Makefile.am
|
|
+++ b/hybris/tests/Makefile.am
|
|
@@ -105,6 +105,33 @@ test_hwcomposer_LDADD = \
|
|
$(top_builddir)/libsync/libsync.la \
|
|
$(top_builddir)/hardware/libhardware.la
|
|
|
|
+if HAS_ANDROID_7_0_0
|
|
+bin_PROGRAMS += test_hwcomposer_7_caf
|
|
+endif
|
|
+
|
|
+test_hwcomposer_7_caf_SOURCES = test_hwcomposer.cpp
|
|
+test_hwcomposer_7_caf_CXXFLAGS = \
|
|
+ -I$(top_srcdir)/include \
|
|
+ $(ANDROID_HEADERS_CFLAGS) \
|
|
+ -DQCOM_BSP=1 -DQTI_BSP=1 \
|
|
+ -I$(top_srcdir)/common \
|
|
+ -I$(top_srcdir)/egl/platforms/common \
|
|
+ -I$(top_srcdir)/egl/platforms/hwcomposer \
|
|
+ -I$(top_srcdir)/libsync
|
|
+
|
|
+if WANT_MESA
|
|
+test_hwcomposer_7_caf_CXXFLAGS += -DLIBHYBRIS_WANTS_MESA_X11_HEADERS
|
|
+endif
|
|
+test_hwcomposer_7_caf_LDADD = \
|
|
+ -lm \
|
|
+ $(top_builddir)/common/libhybris-common.la \
|
|
+ $(top_builddir)/egl/platforms/hwcomposer/libhybris-hwcomposerwindow.la \
|
|
+ $(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
|
|
+ $(top_builddir)/egl/libEGL.la \
|
|
+ $(top_builddir)/glesv2/libGLESv2.la \
|
|
+ $(top_builddir)/libsync/libsync.la \
|
|
+ $(top_builddir)/hardware/libhardware.la
|
|
+
|
|
test_sensors_SOURCES = test_sensors.c
|
|
test_sensors_CFLAGS = \
|
|
-I$(top_srcdir)/include \
|
|
--
|
|
2.19.1
|
|
|