From 8c468fbcc9f0b4a1ef668f62f38bd2ad7c4c7cbb Mon Sep 17 00:00:00 2001 From: Olivier CrĂȘte Date: Fri, 27 Apr 2018 16:01:36 -0400 Subject: gnustl: Use headers from the right architecture --- recipes/gnustl.recipe | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/recipes/gnustl.recipe b/recipes/gnustl.recipe index 7276fe06..00a8b94f 100644 --- a/recipes/gnustl.recipe +++ b/recipes/gnustl.recipe @@ -29,17 +29,18 @@ class Recipe(recipe.Recipe): stl_prefix = os.path.join(self.config.toolchain_prefix, 'sources', 'cxx-stl', 'gnu-libstdc++', self.config.toolchain_version) if self.config.target_arch == Architecture.X86: - stl_libdir = os.path.join(stl_prefix, 'libs', 'x86') + libarch = 'x86' elif self.config.target_arch == Architecture.X86_64: - stl_libdir = os.path.join(stl_prefix, 'libs', 'x86_64') + libarch = 'x86_64' elif self.config.target_arch == Architecture.ARMv7: - stl_libdir = os.path.join(stl_prefix, 'libs', 'armeabi-v7a') + libarch = 'armeabi-v7a' elif self.config.target_arch == Architecture.ARM64: - stl_libdir = os.path.join(stl_prefix, 'libs', 'arm64-v8a') + libarch = 'arm64-v8a' elif self.config.target_arch == Architecture.ARM: - stl_libdir = os.path.join(stl_prefix, 'libs', 'armeabi') + libarch = 'armeabi' else: raise FatalError("Unsupported Android architecture %s" % self.config.target_arch) + stl_libdir = os.path.join(stl_prefix, 'libs', libarch) libdir = os.path.join(self.config.prefix, 'lib') if not os.path.exists(libdir): os.makedirs(libdir) @@ -65,7 +66,7 @@ class Recipe(recipe.Recipe): os.makedirs(pkgdir) stl_pc = PkgConfigWritter('gnustl', 'gnustl', '1.0', '', '-L${libdir} -lgnustl -lsupc++ -lstdc++ ', - '-I%s/include -I%s/libs/armeabi/include' % (stl_prefix, stl_prefix), self.config.prefix) + '-I%s/include -I%s/libs/%s/include' % (stl_prefix, stl_prefix, libarch), self.config.prefix) stl_pc.libs_priv = '${libdir}/libgnustl.a ${libdir}/libsupc++.a' stl_pc.rel_incldir = 'include' stl_pc.save('gnustl', pkgdir) -- cgit v1.2.3