Add /system/vendor/{lib|lib64} to linker args

Add vendor-specific lib directory to ld.mc's library search path.  Since
ld.mc takes multiple search directories, there is no need to derive a
single path at runtime.

bug 20894664

Change-Id: Id62d2acbd94914c70bf4668f553a94a33e2a0587
diff --git a/cpu_ref/rsCpuExecutable.cpp b/cpu_ref/rsCpuExecutable.cpp
index e783108..8df0bfd 100644
--- a/cpu_ref/rsCpuExecutable.cpp
+++ b/cpu_ref/rsCpuExecutable.cpp
@@ -128,12 +128,13 @@
     const char *compiler_rt = SYSLIBPATH"/libcompiler_rt.so";
     const char *mTriple = "-mtriple=" DEFAULT_TARGET_TRIPLE_STRING;
     const char *libPath = "--library-path=" SYSLIBPATH;
+    const char *vendorLibPath = "--library-path=" SYSLIBPATH_VENDOR;
 
     std::vector<const char *> args = {
         LD_EXE_PATH,
         "-shared",
         "-nostdlib",
-        compiler_rt, mTriple, libPath,
+        compiler_rt, mTriple, vendorLibPath, libPath,
         linkDriverName.c_str(), "-lm", "-lc",
         objFileName.c_str(),
         "-o", sharedLibName.c_str(),
diff --git a/cpu_ref/rsCpuScript.h b/cpu_ref/rsCpuScript.h
index 22f973b..fc3a0a9 100644
--- a/cpu_ref/rsCpuScript.h
+++ b/cpu_ref/rsCpuScript.h
@@ -153,8 +153,10 @@
 
 #ifdef __LP64__
 #define SYSLIBPATH "/system/lib64"
+#define SYSLIBPATH_VENDOR "/system/vendor/lib64"
 #else
 #define SYSLIBPATH "/system/lib"
+#define SYSLIBPATH_VENDOR "/system/vendor/lib"
 #endif
 
 }