Skip to content
Permalink
Browse files

hybris: common: o: improve android pie support

  • Loading branch information
krnlyng committed Nov 13, 2019
1 parent 33da544 commit 19829c0e2fcc60220ef5111cd4cda12a74c9f4d5
Showing with 22 additions and 0 deletions.
  1. +5 −0 hybris/common/o/Makefile.am
  2. +16 −0 hybris/common/o/linker.cpp
  3. +1 −0 hybris/configure.ac
@@ -49,6 +49,11 @@ o_la_CPPFLAGS = \
-DDEFAULT_HYBRIS_LD_LIBRARY_PATH="\"@DEFAULT_HYBRIS_LD_LIBRARY_PATH@\"" \
$(ARCH_FLAGS) \
$(ANDROID_HEADERS_CFLAGS)

if HAS_ANDROID_9_0_0
o_la_CPPFLAGS += -DHAS_ANDROID_9_0_0
endif

o_la_LDFLAGS = \
-lsupc++ \
-module \
@@ -121,11 +121,17 @@ static const char* const kVendorLibDir = "/vendor/lib";
static const char* const kVendorLibEglDir = "/vendor/lib/egl";
static const char* const kOdmLibDir = "/odm/lib";
static const char* const kOdmLibEglDir = "/odm/lib/egl";
#ifdef HAS_ANDROID_9_0_0
static const char* const kSystemLibVndk28Dir = "/system/lib/vndk-28";
#endif
static const char* const kAsanSystemLibDir = "/data/asan/system/lib";
static const char* const kAsanVendorLibDir = "/data/asan/vendor/lib";
static const char* const kAsanVendorLibEglDir = "/data/asan/vendor/lib/egl";
static const char* const kAsanOdmLibDir = "/data/asan/odm/lib";
static const char* const kAsanOdmLibEglDir = "/data/asan/odm/lib/egl";
#ifdef HAS_ANDROID_9_0_0
static const char* const kAsanSystemLibVndk28Dir = "/data/asan/system/lib/vndk-28";
#endif
#endif

static const char* const kAsanLibDirPrefix = "/data/asan";
@@ -135,8 +141,13 @@ static const char* const kDefaultLdPaths[] = {
kOdmLibDir,
kVendorLibDir,

// libhybris support:
kOdmLibEglDir,
kVendorLibEglDir,

#ifdef HAS_ANDROID_9_0_0
kSystemLibVndk28Dir,
#endif
nullptr
};

@@ -153,6 +164,11 @@ static const char* const kAsanDefaultLdPaths[] = {
kOdmLibEglDir,
kAsanVendorLibEglDir,
kVendorLibEglDir,

#ifdef HAS_ANDROID_9_0_0
kAsanSystemLibVndk28Dir,
kSystemLibVndk28Dir,
#endif
nullptr
};

@@ -228,6 +228,7 @@ AC_SUBST(ANDROID_VERSION_PATCH, [$android_headers_patch])
AC_MSG_NOTICE("Android headers version is $android_headers_major.$android_headers_minor.$android_headers_patch")

# Add automake tests for version/API needs here that you need in code, including test .am's
AM_CONDITIONAL([HAS_ANDROID_9_0_0], [test $android_headers_major -ge 9 -a $android_headers_minor -ge 0 ])
AM_CONDITIONAL([HAS_ANDROID_8_0_0], [test $android_headers_major -ge 8 -a $android_headers_minor -ge 0 ])
AM_CONDITIONAL([HAS_ANDROID_7_0_0], [test $android_headers_major -ge 7 -a $android_headers_minor -ge 0 ])
AM_CONDITIONAL([HAS_ANDROID_6_0_0], [test $android_headers_major -ge 6 -a $android_headers_minor -ge 0 ])

1 comment on commit 19829c0

@JamiKettunen

This comment has been minimized.

Copy link

@JamiKettunen JamiKettunen commented on 19829c0 Nov 19, 2019

Works nice for me using SailfishOS based on hybris-16.0 👍 no more need for my hacky symlink to get audio sailfishos-oneplus5/droid-config-cheeseburger@c371cf1
Any chance for this to get a PR & be merged into libhybris soon?

Please sign in to comment.
You can’t perform that action at this time.