Separate function list for each target.

Change-Id: I0f5f92efe206adb843a18ff05cd95707ee5a24d2
diff --git a/lib/AndroidBitcode/ABCCompilerDriver.cpp b/lib/AndroidBitcode/ABCCompilerDriver.cpp
index 59d6dda..696cd62 100644
--- a/lib/AndroidBitcode/ABCCompilerDriver.cpp
+++ b/lib/AndroidBitcode/ABCCompilerDriver.cpp
@@ -98,16 +98,13 @@
   // Add non-portable function list. For each function X, linker will rename
   // it to X_portable. And X_portable" is implemented in libportable to solve
   // portable issues.
-  mLinkerConfig->addPortable("stat");
-  mLinkerConfig->addPortable("fstat");
-  mLinkerConfig->addPortable("lstat");
-  mLinkerConfig->addPortable("fstatat");
-  mLinkerConfig->addPortable("socket");
-  mLinkerConfig->addPortable("setsockopt");
-  mLinkerConfig->addPortable("getsockopt");
-  mLinkerConfig->addPortable("epoll_event");
-  mLinkerConfig->addPortable("epoll_ctl");
-  mLinkerConfig->addPortable("epoll_wait");
+  const char **non_portable_func = getNonPortableList();
+  if (non_portable_func != NULL) {
+    while (*non_portable_func != NULL) {
+      mLinkerConfig->addPortable(*non_portable_func);
+      non_portable_func++;
+    }
+  }
 
   // -shared
   mLinkerConfig->setShared(true);