diff --git a/hybris/libhybris/0001-Make-libhybris-compile-with-musl.patch b/hybris/libhybris/0001-Make-libhybris-compile-with-musl.patch index d24a3bdc7..cb6180593 100644 --- a/hybris/libhybris/0001-Make-libhybris-compile-with-musl.patch +++ b/hybris/libhybris/0001-Make-libhybris-compile-with-musl.patch @@ -1,38 +1,43 @@ -From 98b46a48875cedf8af2445be63f196b6fe9b8648 Mon Sep 17 00:00:00 2001 +From eb4efbb1320271a74cb1ee01dcdce3c088ce5abe Mon Sep 17 00:00:00 2001 From: NeKit Date: Wed, 1 Nov 2017 15:39:45 +0300 -Subject: [PATCH 1/3] Make libhybris compile with musl +Subject: [PATCH 1/2] Make libhybris compile with musl Hooks for some functions had to be disabled due to musl not having/exposing them, which might lead to problems depending on how musl/bionic are (in)compatible. --- - hybris/common/hooks.c | 44 ++++++++++++++++++++++ - hybris/common/hooks_shm.c | 4 ++ - hybris/common/jb/dlfcn.c | 4 ++ - hybris/common/mm/bionic/libc/include/link.h | 1 + - .../common/mm/bionic/libc/private/libc_logging.h | 13 +++++++ - hybris/common/mm/dlfcn.cpp | 4 ++ - hybris/common/mm/hybris_compat.h | 11 ++++++ - hybris/common/mm/linker.cpp | 11 ++++++ - hybris/common/n/bionic/libc/include/dlfcn.h | 4 +- - hybris/common/n/bionic/libc/include/link.h | 1 + - hybris/common/n/bionic/libc/private/libc_logging.h | 15 +++++++- - hybris/common/n/dlfcn.cpp | 4 ++ - hybris/common/n/hybris_compat.cpp | 8 ++++ - hybris/common/n/hybris_compat.h | 22 +++++++++++ - hybris/include/hybris/common/musl_compat.h | 10 +++++ - hybris/common/legacy_properties/properties.c | 3 ++ - hybris/tests/test_camera.c | 4 ++ - 17 files changed, 160 insertions(+), 3 deletions(-) + hybris/common/hooks.c | 44 +++++++++++++++++++ + hybris/common/hooks_shm.c | 4 ++ + hybris/common/jb/dlfcn.c | 4 ++ + hybris/common/legacy_properties/properties.c | 3 ++ + hybris/common/mm/bionic/libc/include/link.h | 1 + + .../mm/bionic/libc/private/libc_logging.h | 13 ++++++ + hybris/common/mm/dlfcn.cpp | 4 ++ + hybris/common/mm/hybris_compat.h | 11 +++++ + hybris/common/mm/linker.cpp | 11 +++++ + hybris/common/n/bionic/libc/include/dlfcn.h | 4 +- + hybris/common/n/bionic/libc/include/link.h | 1 + + .../n/bionic/libc/private/libc_logging.h | 15 ++++++- + hybris/common/n/dlfcn.cpp | 4 ++ + hybris/common/n/hybris_compat.cpp | 8 ++++ + hybris/common/n/hybris_compat.h | 22 ++++++++++ + hybris/common/o/bionic/libc/include/dlfcn.h | 8 ++-- + hybris/common/o/dlfcn.cpp | 4 ++ + hybris/common/o/hybris_compat.cpp | 8 ++++ + hybris/common/o/hybris_compat.h | 22 ++++++++++ + hybris/include/hybris/common/musl_compat.h | 10 +++++ + hybris/libsync/sync.c | 1 + + hybris/tests/test_camera.c | 4 ++ + 22 files changed, 199 insertions(+), 7 deletions(-) create mode 100644 hybris/include/hybris/common/musl_compat.h diff --git a/hybris/common/hooks.c b/hybris/common/hooks.c -index 3b21d74..01e1f3e 100644 +index 03b29d4..2a3a20b 100644 --- a/hybris/common/hooks.c +++ b/hybris/common/hooks.c -@@ -73,6 +73,10 @@ - #include +@@ -80,6 +80,10 @@ extern int my_property_list(void (*propfn)(const char *key, const char *value, v + #include +#ifndef __GLIBC__ @@ -41,8 +46,8 @@ index 3b21d74..01e1f3e 100644 + #include - #ifdef WANT_ARM_TRACING -@@ -504,6 +508,7 @@ static int _hybris_hook_pthread_attr_getstacksize(pthread_attr_t const *__attr, + // this is also used in bionic: +@@ -531,6 +535,7 @@ static int _hybris_hook_pthread_attr_getstacksize(pthread_attr_t const *__attr, return pthread_attr_getstacksize(realattr, stack_size); } @@ -50,7 +55,7 @@ index 3b21d74..01e1f3e 100644 static int _hybris_hook_pthread_attr_setstackaddr(pthread_attr_t *__attr, void *stack_addr) { pthread_attr_t *realattr = (pthread_attr_t *) *(uintptr_t *) __attr; -@@ -521,6 +526,7 @@ static int _hybris_hook_pthread_attr_getstackaddr(pthread_attr_t const *__attr, +@@ -548,6 +553,7 @@ static int _hybris_hook_pthread_attr_getstackaddr(pthread_attr_t const *__attr, return pthread_attr_getstackaddr(realattr, stack_addr); } @@ -58,7 +63,7 @@ index 3b21d74..01e1f3e 100644 static int _hybris_hook_pthread_attr_setstack(pthread_attr_t *__attr, void *stack_base, size_t stack_size) { -@@ -1107,6 +1113,7 @@ static int _hybris_hook_pthread_rwlockattr_getpshared(pthread_rwlockattr_t *__at +@@ -1134,6 +1140,7 @@ static int _hybris_hook_pthread_rwlockattr_getpshared(pthread_rwlockattr_t *__at return pthread_rwlockattr_getpshared(realattr, pshared); } @@ -66,7 +71,7 @@ index 3b21d74..01e1f3e 100644 int _hybris_hook_pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *attr, int pref) { pthread_rwlockattr_t *realattr = (pthread_rwlockattr_t *) *(uintptr_t *) attr; -@@ -1124,6 +1131,7 @@ int _hybris_hook_pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *attr, +@@ -1151,6 +1158,7 @@ int _hybris_hook_pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *attr, return pthread_rwlockattr_getkind_np(realattr, pref); } @@ -74,7 +79,7 @@ index 3b21d74..01e1f3e 100644 /* * pthread_rwlock_* functions -@@ -1443,10 +1451,14 @@ static int _hybris_hook_fgetpos(FILE *fp, bionic_fpos_t *pos) +@@ -1500,10 +1508,14 @@ static int _hybris_hook_fgetpos(FILE *fp, bionic_fpos_t *pos) { TRACE_HOOK("fp %p pos %p", fp, pos); @@ -89,7 +94,7 @@ index 3b21d74..01e1f3e 100644 return ret; } -@@ -1532,12 +1544,16 @@ static int _hybris_hook_fsetpos(FILE *fp, const bionic_fpos_t *pos) +@@ -1589,12 +1601,16 @@ static int _hybris_hook_fsetpos(FILE *fp, const bionic_fpos_t *pos) { TRACE_HOOK("fp %p pos %p", fp, pos); @@ -106,7 +111,7 @@ index 3b21d74..01e1f3e 100644 } static long _hybris_hook_ftell(FILE *fp) -@@ -1815,6 +1831,7 @@ static int _hybris_hook_versionsort(struct bionic_dirent **a, +@@ -1872,6 +1888,7 @@ static int _hybris_hook_versionsort(struct bionic_dirent **a, return strverscmp((*a)->d_name, (*b)->d_name); } @@ -114,7 +119,7 @@ index 3b21d74..01e1f3e 100644 static int _hybris_hook_scandirat(int fd, const char *dir, struct bionic_dirent ***namelist, int (*filter) (const struct bionic_dirent *), -@@ -1876,6 +1893,7 @@ static int _hybris_hook_scandir(const char *dir, +@@ -1933,6 +1950,7 @@ static int _hybris_hook_scandir(const char *dir, { return _hybris_hook_scandirat(AT_FDCWD, dir, namelist, filter, compar); } @@ -122,7 +127,7 @@ index 3b21d74..01e1f3e 100644 static inline void swap(void **a, void **b) { -@@ -2125,6 +2143,7 @@ int _hybris_hook_open(const char *pathname, int flags, ...) +@@ -2190,6 +2208,7 @@ int _hybris_hook_open(const char *pathname, int flags, ...) return open(target_path, flags, mode); } @@ -130,7 +135,7 @@ index 3b21d74..01e1f3e 100644 /** * Wrap some GCC builtin functions, which don't have any address */ -@@ -2150,6 +2169,7 @@ __THROW int _hybris_hook___snprintf_chk (char *__restrict __s, size_t __n, int _ +@@ -2215,6 +2234,7 @@ __THROW int _hybris_hook___snprintf_chk (char *__restrict __s, size_t __n, int _ return ret; } @@ -138,7 +143,7 @@ index 3b21d74..01e1f3e 100644 static __thread void *tls_hooks[16]; -@@ -2295,6 +2315,7 @@ static char* _hybris_hook_setlocale(int category, const char *locale) +@@ -2360,6 +2380,7 @@ static char* _hybris_hook_setlocale(int category, const char *locale) return setlocale(category, locale); } @@ -146,7 +151,7 @@ index 3b21d74..01e1f3e 100644 static void* _hybris_hook_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) { -@@ -2310,6 +2331,7 @@ static int _hybris_hook_munmap(void *addr, size_t length) +@@ -2375,6 +2396,7 @@ static int _hybris_hook_munmap(void *addr, size_t length) return munmap(addr, length); } @@ -154,7 +159,7 @@ index 3b21d74..01e1f3e 100644 extern size_t strlcat(char *dst, const char *src, size_t siz); extern size_t strlcpy(char *dst, const char *src, size_t siz); -@@ -2463,7 +2485,9 @@ static struct _hook hooks_common[] = { +@@ -2635,7 +2657,9 @@ static struct _hook hooks_common[] = { HOOK_DIRECT_NO_DEBUG(realloc), HOOK_DIRECT_NO_DEBUG(memalign), HOOK_DIRECT_NO_DEBUG(valloc), @@ -164,7 +169,7 @@ index 3b21d74..01e1f3e 100644 HOOK_DIRECT(fread), HOOK_DIRECT_NO_DEBUG(getxattr), HOOK_DIRECT(mprotect), -@@ -2513,8 +2537,10 @@ static struct _hook hooks_common[] = { +@@ -2685,8 +2709,10 @@ static struct _hook hooks_common[] = { HOOK_DIRECT_NO_DEBUG(bcopy), HOOK_DIRECT_NO_DEBUG(bzero), HOOK_DIRECT_NO_DEBUG(ffs), @@ -175,7 +180,7 @@ index 3b21d74..01e1f3e 100644 /* pthread.h */ HOOK_DIRECT_NO_DEBUG(getauxval), HOOK_INDIRECT(gettid), -@@ -2573,8 +2599,10 @@ static struct _hook hooks_common[] = { +@@ -2745,8 +2771,10 @@ static struct _hook hooks_common[] = { HOOK_INDIRECT(pthread_attr_getschedparam), HOOK_INDIRECT(pthread_attr_setstacksize), HOOK_INDIRECT(pthread_attr_getstacksize), @@ -186,7 +191,7 @@ index 3b21d74..01e1f3e 100644 HOOK_INDIRECT(pthread_attr_setstack), HOOK_INDIRECT(pthread_attr_getstack), HOOK_INDIRECT(pthread_attr_setguardsize), -@@ -2682,8 +2710,10 @@ static struct _hook hooks_common[] = { +@@ -2868,8 +2896,10 @@ static struct _hook hooks_common[] = { HOOK_DIRECT_NO_DEBUG(seekdir), HOOK_DIRECT_NO_DEBUG(telldir), HOOK_DIRECT_NO_DEBUG(dirfd), @@ -197,7 +202,7 @@ index 3b21d74..01e1f3e 100644 HOOK_INDIRECT(alphasort), HOOK_INDIRECT(versionsort), /* fcntl.h */ -@@ -2707,7 +2737,9 @@ static struct _hook hooks_common[] = { +@@ -2893,7 +2923,9 @@ static struct _hook hooks_common[] = { HOOK_DIRECT_NO_DEBUG(localtime_r), HOOK_DIRECT_NO_DEBUG(gmtime), HOOK_DIRECT_NO_DEBUG(abort), @@ -207,7 +212,7 @@ index 3b21d74..01e1f3e 100644 /* unistd.h */ HOOK_DIRECT_NO_DEBUG(access), /* grp.h */ -@@ -2736,13 +2768,17 @@ static struct _hook hooks_mm[] = { +@@ -2912,13 +2944,17 @@ static struct _hook hooks_mm[] = { HOOK_DIRECT(putenv), HOOK_DIRECT(clearenv), HOOK_DIRECT_NO_DEBUG(dprintf), @@ -225,7 +230,7 @@ index 3b21d74..01e1f3e 100644 /* unistd.h */ HOOK_DIRECT(fork), HOOK_DIRECT_NO_DEBUG(ttyname), -@@ -2764,15 +2800,21 @@ static struct _hook hooks_mm[] = { +@@ -2940,15 +2976,21 @@ static struct _hook hooks_mm[] = { HOOK_DIRECT(localeconv), HOOK_DIRECT(setlocale), /* sys/mman.h */ @@ -247,7 +252,7 @@ index 3b21d74..01e1f3e 100644 HOOK_INDIRECT(fputws), // It's enough to hook vfwprintf here as fwprintf will call it with a // proper va_list in place so we don't have to handle this here. -@@ -2826,9 +2868,11 @@ static struct _hook hooks_mm[] = { +@@ -3002,9 +3044,11 @@ static struct _hook hooks_mm[] = { /* dirent.h */ HOOK_TO(readdir64, _hybris_hook_readdir), HOOK_TO(readdir64_r, _hybris_hook_readdir_r), @@ -289,6 +294,20 @@ index 78500e4..6996527 100644 /* This file hijacks the symbols stubbed out in libdl.so. */ #define DL_SUCCESS 0 +diff --git a/hybris/common/legacy_properties/properties.c b/hybris/common/legacy_properties/properties.c +index 0191e7c..c96bd59 100644 +--- a/hybris/common/legacy_properties/properties.c ++++ b/hybris/common/legacy_properties/properties.c +@@ -36,6 +36,9 @@ + #include + + #include ++#ifndef __GLIBC__ ++#include ++#endif + #include "properties_p.h" + + static const char property_service_socket[] = "/dev/socket/" PROP_SERVICE_NAME; diff --git a/hybris/common/mm/bionic/libc/include/link.h b/hybris/common/mm/bionic/libc/include/link.h index cb8e139..10d105d 100644 --- a/hybris/common/mm/bionic/libc/include/link.h @@ -334,7 +353,7 @@ index 6beb47e..e526c03 100644 // // Formats a message to the log (priority 'fatal'), but doesn't abort. diff --git a/hybris/common/mm/dlfcn.cpp b/hybris/common/mm/dlfcn.cpp -index 8a8213f..e9f6914 100644 +index 13976db..d0ec9e5 100644 --- a/hybris/common/mm/dlfcn.cpp +++ b/hybris/common/mm/dlfcn.cpp @@ -31,6 +31,10 @@ @@ -376,7 +395,7 @@ index 2e10383..de1d852 100644 + #endif diff --git a/hybris/common/mm/linker.cpp b/hybris/common/mm/linker.cpp -index 10a3853..8fe23b3 100644 +index 42340cc..986d065 100644 --- a/hybris/common/mm/linker.cpp +++ b/hybris/common/mm/linker.cpp @@ -38,6 +38,9 @@ @@ -389,7 +408,7 @@ index 10a3853..8fe23b3 100644 #include #include -@@ -1169,7 +1172,11 @@ static const char* fix_dt_needed(const char* dt_needed, const char* sopath) { +@@ -1193,7 +1196,11 @@ static const char* fix_dt_needed(const char* dt_needed, const char* sopath) { #if !defined(__LP64__) // Work around incorrect DT_NEEDED entries for old apps: http://b/21364029 if (get_application_target_sdk_version() <= 22) { @@ -401,7 +420,7 @@ index 10a3853..8fe23b3 100644 if (bname != dt_needed) { DL_WARN("'%s' library has invalid DT_NEEDED entry '%s'", sopath, dt_needed); } -@@ -2900,7 +2907,11 @@ bool soinfo::prelink_image() { +@@ -2924,7 +2931,11 @@ bool soinfo::prelink_image() { // the main executable and linker; they do not need to have dt_soname if (soname_ == nullptr && this != somain && (flags_ & FLAG_LINKER) == 0 && get_application_target_sdk_version() <= 22) { @@ -474,7 +493,7 @@ index a696cec..2da0238 100644 // // Formats a message to the log (priority 'fatal'), but doesn't abort. diff --git a/hybris/common/n/dlfcn.cpp b/hybris/common/n/dlfcn.cpp -index 056f271..91d52ed 100644 +index 92c1349..bfdbb9c 100644 --- a/hybris/common/n/dlfcn.cpp +++ b/hybris/common/n/dlfcn.cpp @@ -30,6 +30,10 @@ @@ -522,6 +541,95 @@ index 2e10383..77a0919 100644 #define DT_ANDROID_RELA (DT_LOOS + 4) #define DT_ANDROID_RELASZ (DT_LOOS + 5) ++#if defined (__aarch64__) ++ ++#ifndef R_AARCH64_TLS_DTPREL32 ++#define R_AARCH64_TLS_DTPREL32 1031 ++#endif ++ ++#ifndef R_AARCH64_IRELATIVE ++#define R_AARCH64_IRELATIVE 1032 ++#endif ++ ++#endif ++ ++#ifndef __GLIBC__ ++#ifndef basename ++const char *gnu_basename(const char *path); ++#define basename gnu_basename ++#endif ++#endif ++ + #endif +diff --git a/hybris/common/o/bionic/libc/include/dlfcn.h b/hybris/common/o/bionic/libc/include/dlfcn.h +index acec4a2..3943882 100644 +--- a/hybris/common/o/bionic/libc/include/dlfcn.h ++++ b/hybris/common/o/bionic/libc/include/dlfcn.h +@@ -57,11 +57,11 @@ typedef struct { + } Dl_info; + + void* dlopen(const char* filename, int flag); +-int dlclose(void* handle) __nonnull((1)); ++int dlclose(void* handle) __attribute__((nonnull((1)))); + char* dlerror(void); +-void* dlsym(void* handle, const char* symbol) __nonnull((2)); +-void* dlvsym(void* handle, const char* symbol, const char* version) __nonnull((2, 3)); +-int dladdr(const void* addr, Dl_info* info) __nonnull((2)); ++void* dlsym(void* handle, const char* symbol) __attribute__((nonnull((2)))); ++void* dlvsym(void* handle, const char* symbol, const char* version) __attribute__((nonnull((2, 3)))); ++int dladdr(const void* addr, Dl_info* info) __attribute__((nonnull((2)))); + + #define RTLD_LOCAL 0 + #define RTLD_LAZY 0x00001 +diff --git a/hybris/common/o/dlfcn.cpp b/hybris/common/o/dlfcn.cpp +index 6fddbbb..f98f4d2 100644 +--- a/hybris/common/o/dlfcn.cpp ++++ b/hybris/common/o/dlfcn.cpp +@@ -42,6 +42,10 @@ + #include "private/bionic_tls.h" + #include "private/ScopedPthreadMutexLocker.h" + ++#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP ++#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP {{PTHREAD_MUTEX_RECURSIVE}} ++#endif ++ + static pthread_mutex_t g_dl_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; + + static __thread char *dl_err_str; +diff --git a/hybris/common/o/hybris_compat.cpp b/hybris/common/o/hybris_compat.cpp +index cfe1e78..5238409 100644 +--- a/hybris/common/o/hybris_compat.cpp ++++ b/hybris/common/o/hybris_compat.cpp +@@ -27,3 +27,11 @@ + */ + + #include "hybris_compat.h" ++ ++#ifndef __GLIBC__ ++const char *gnu_basename(const char *path) ++{ ++ char *base = strrchr(path, '/'); ++ return base ? base + 1 : path; ++} ++#endif +diff --git a/hybris/common/o/hybris_compat.h b/hybris/common/o/hybris_compat.h +index 2e10383..77a0919 100644 +--- a/hybris/common/o/hybris_compat.h ++++ b/hybris/common/o/hybris_compat.h +@@ -32,6 +32,9 @@ + + #include + #include ++#ifndef __GLIBC__ ++#include ++#endif + + extern "C" size_t strlcpy(char *dest, const char *src, size_t size); + extern "C" size_t strlcat(char *dst, const char *src, size_t size); +@@ -55,4 +58,23 @@ extern "C" size_t strlcat(char *dst, const char *src, size_t size); + #define DT_ANDROID_RELA (DT_LOOS + 4) + #define DT_ANDROID_RELASZ (DT_LOOS + 5) + +#if defined (__aarch64__) + +#ifndef R_AARCH64_TLS_DTPREL32 @@ -558,25 +666,23 @@ index 0000000..c5f86f2 + while (__result == -1L && errno == EINTR); \ + __result; })) +#endif -diff --git a/hybris/common/legacy_properties/properties.c b/hybris/common/legacy_properties/properties.c -index 55cdda6..ae8bbbc 100644 ---- a/hybris/common/legacy_properties/properties.c -+++ b/hybris/common/legacy_properties/properties.c -@@ -36,6 +36,9 @@ - #include - - #include -+#ifndef __GLIBC__ -+#include -+#endif - #include "properties_p.h" - +diff --git a/hybris/libsync/sync.c b/hybris/libsync/sync.c +index dbc3eba..e66840a 100644 +--- a/hybris/libsync/sync.c ++++ b/hybris/libsync/sync.c +@@ -27,6 +27,7 @@ + #include + #include + #else ++#include + #include + #endif diff --git a/hybris/tests/test_camera.c b/hybris/tests/test_camera.c -index 693a6fb..8f4bc38 100644 +index 7ac81f4..b7993a9 100644 --- a/hybris/tests/test_camera.c +++ b/hybris/tests/test_camera.c -@@ -40,6 +40,10 @@ +@@ -45,6 +45,10 @@ #include #include @@ -588,5 +694,5 @@ index 693a6fb..8f4bc38 100644 int32_t current_zoom_level = 1; bool new_camera_frame_available = true; -- -2.15.1 +2.23.0 diff --git a/hybris/libhybris/0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch b/hybris/libhybris/0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch index 02703ec44..45822729c 100644 --- a/hybris/libhybris/0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch +++ b/hybris/libhybris/0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch @@ -1,4 +1,4 @@ -From 91f4908067686c28e10894d4bd6042c0a452bf24 Mon Sep 17 00:00:00 2001 +From dd95903bd734aed6407f682aa843a293814d2ec5 Mon Sep 17 00:00:00 2001 From: Richard Braakman Date: Wed, 1 Nov 2017 23:35:31 +0300 Subject: [PATCH 2/3] [tests] Regression test for EGL-glibc TLS conflict bionic @@ -15,10 +15,10 @@ why the test was added to test_glesv2.c 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/hybris/tests/test_hwcomposer.cpp b/hybris/tests/test_hwcomposer.cpp -index 2253d50..b5d04a4 100644 +index 68917db..695291e 100644 --- a/hybris/tests/test_hwcomposer.cpp +++ b/hybris/tests/test_hwcomposer.cpp -@@ -29,6 +29,23 @@ +@@ -32,6 +32,23 @@ #include #include @@ -42,7 +42,7 @@ index 2253d50..b5d04a4 100644 const char vertex_src [] = " \ attribute vec4 position; \ -@@ -343,7 +360,7 @@ int main(int argc, char **argv) +@@ -346,7 +363,7 @@ int main(int argc, char **argv) glClearColor ( 1. , 1. , 1. , 1.); // background color float phase = 0; int i, oldretire = -1, oldrelease = -1, oldrelease2 = -1; @@ -51,7 +51,7 @@ index 2253d50..b5d04a4 100644 glClear(GL_COLOR_BUFFER_BIT); glUniform1f ( phase_loc , phase ); // write the value of phase to the shaders phase phase = fmodf ( phase + 0.5f , 2.f * 3.141f ); // and update the local variable -@@ -369,6 +386,18 @@ int main(int argc, char **argv) +@@ -372,6 +389,18 @@ int main(int argc, char **argv) printf("terminated\n"); android_dlclose(baz); #endif @@ -69,7 +69,7 @@ index 2253d50..b5d04a4 100644 + return 0; } - // vim:ts=4:sw=4:noexpandtab + #else -- -2.15.1 +2.23.0 diff --git a/hybris/libhybris/APKBUILD b/hybris/libhybris/APKBUILD index 4058f1320..9d0ea5c1a 100644 --- a/hybris/libhybris/APKBUILD +++ b/hybris/libhybris/APKBUILD @@ -1,13 +1,13 @@ pkgname=libhybris pkgver=1.0_git20191001 -pkgrel=0 +pkgrel=1 arch="x86 armhf armv7 aarch64" url="https://github.com/libhybris/libhybris" license="Apache" makedepends="autoconf automake libtool wayland-dev linux-headers bsd-compat-headers libx11-dev libxcb-dev libxext-dev - android-headers-7.1 android-headers-4.4" -depends_dev="bsd-compat-headers android-headers-7.1" + android-headers-9.0 android-headers-7.1 android-headers-4.4" +depends_dev="bsd-compat-headers android-headers-9.0" _commit="eaa6884ba95a1d5d0303119ffdc48952a098059b" source="$pkgname-$_commit.tar.gz::https://github.com/libhybris/libhybris/archive/$_commit.tar.gz 0001-Make-libhybris-compile-with-musl.patch @@ -18,21 +18,21 @@ source="$pkgname-$_commit.tar.gz::https://github.com/libhybris/libhybris/archive pkgdesc="libhybris allows to use bionic-based HW adaptations" subpackages="$pkgname-dev $pkgname-egl $pkgname-gles $pkgname-libwayland-egl:_wayland - $pkgname-7.1:_specific $pkgname-4.4:_specific" + $pkgname-9.0:_specific $pkgname-7.1:_specific $pkgname-4.4:_specific" if [ "$CARCH" == "aarch64" ]; then subpackages="$pkgname-dev $pkgname-egl $pkgname-gles $pkgname-libwayland-egl:_wayland - $pkgname-7.1:_specific" + $pkgname-9.0:_specific $pkgname-7.1:_specific" elif [ "$CARCH" == "x86" ]; then subpackages="$pkgname-dev $pkgname-egl $pkgname-gles $pkgname-libwayland-egl:_wayland - $pkgname-7.1:_specific $pkgname-4.4:_specific" + $pkgname-9.0:_specific $pkgname-7.1:_specific $pkgname-4.4:_specific" fi options="!check !strip !tracedeps" builddir="$srcdir/$pkgname-$_commit" _tmppkgdir="$srcdir/tmpinstall" -_main_headers_ver=7.1 +_main_headers_ver=9.0 _bins_specific="test_audio test_camera test_egl_configs test_gps test_hwcomposer test_hwcomposer_7_caf test_input test_lights test_media test_nfc @@ -54,19 +54,19 @@ build() { NOCONFIGURE=1 ./autogen.sh if [ "$CARCH" == "armhf" -o "$CARCH" == "armv7" ]; then - _vers="7.1 4.4" + _vers="9.0 7.1 4.4" _ldpath="/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib" _arch="arm" _enable_quirks="--enable-mali-quirks \ --enable-adreno-quirks" elif [ "$CARCH" == "aarch64" ]; then - _vers="7.1" + _vers="9.0 7.1" _ldpath="/usr/libexec/droid-hybris/system/lib64:/vendor/lib64:/system/lib64" _arch="arm64" _enable_quirks="--enable-mali-quirks \ --enable-adreno-quirks" elif [ "$CARCH" == "x86" ]; then - _vers="7.1 4.4" + _vers="9.0 7.1 4.4" _ldpath="/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib" _arch="x86" fi @@ -168,7 +168,7 @@ dev() { } sha512sums="598e4a788d38116437d24052b2153abd980d11fc8a277b5a0655ab96a6b8803388260e4621200f015570dcfa0ebb66fb68eeeb99948f1d9d4b9a04aa71d06540 libhybris-eaa6884ba95a1d5d0303119ffdc48952a098059b.tar.gz -9f7a324f18332e44f8789108e32f0587c268d10adaee0040c42d1bece7ab58e292d68243e7814f34f37b3b5dff590758269e531b4f2fd1991334eda4333f5854 0001-Make-libhybris-compile-with-musl.patch -1355a4403d1af8bdf75b9e4502cbfc093b9788224ce7c24a1f6a53dd7996d385d31a3362577a4293db6b6d0dd0ae4e88140b38c658ff0a288d9acfc2753859bb 0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch +a1b707c9aaa7bde2907d04742d7d582df57949415e1afe16c3b461671421a18643008e19aa006e9e67b9644392ec4e2d58c6de725d2db2df077a49526f2893ce 0001-Make-libhybris-compile-with-musl.patch +64fa516c823859c062d175a51fc86846dc85f4e98989cf12c7cb8c9a13ffffb748f6152543f1a6e22f5fe78eb619880262b3c8ff3b6cbd314241fec16ef2eff5 0002-tests-Regression-test-for-EGL-glibc-TLS-conflict.patch db7bb0ffc04042b32d870db364df4d38d9769978f26d71f98dd2569b4cae7fb3839c7a0c421b465f931a57fcde38b8eca091b7ae0062e32a7e09b93a701397f3 0003-PATCH-v2-Implement-X11-EGL-platform-based-on-wayland.patch eda57804fefa1d586e90fb2198c310f65e6dbc7e09b5d1dd7d15df4ab152c4c8915c212230a92c35ec8a013d3ec7a7b1d289653bedb46b7eb2850a477ccebe16 0004-Build-test-hwcomposer-7-caf.patch"