Look for plugins in target triplet subdir 79/16879/3
authorDamjan Marion <damarion@cisco.com>
Fri, 18 Jan 2019 16:09:44 +0000 (17:09 +0100)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 18 Jan 2019 22:02:27 +0000 (22:02 +0000)
Change-Id: I3bab0ab05b4f552ad64392439fb48409ab0ab8c0
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/CMakeLists.txt
src/vpp/vnet/main.c
src/vppinfra/config.h.in

index b404b50..59da1fe 100644 (file)
@@ -41,6 +41,7 @@ if(CMAKE_CROSSCOMPILING)
     /usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu/lib/
   )
 endif()
+set(CMAKE_C_COMPILER_TARGET ${CMAKE_SYSTEM_PROCESSOR}-linux-gnu)
 
 ##############################################################################
 # build config
index 41f70d0..6819ae6 100644 (file)
@@ -57,11 +57,13 @@ vpp_find_plugin_path ()
     return;
   *p = 0;
 
-  s = format (0, "%s/lib/vpp_plugins", path);
+  s = format (0, "%s/lib/" CLIB_TARGET_TRIPLET "/vpp_plugins:"
+             "%s/lib/vpp_plugins", path, path);
   vec_add1 (s, 0);
   vlib_plugin_path = (char *) s;
 
-  s = format (0, "%s/lib/vpp_api_test_plugins", path);
+  s = format (0, "%s/lib/" CLIB_TARGET_TRIPLET "/vpp_api_test_plugins:"
+             "%s/lib/vpp_api_test_plugins", path, path);
   vec_add1 (s, 0);
   vat_plugin_path = (char *) s;
 }
index 58a9731..a7a22a6 100644 (file)
@@ -21,4 +21,6 @@
 #endif
 
 #define USE_DLMALLOC @DLMALLOC@
+
+#define CLIB_TARGET_TRIPLET "@CMAKE_C_COMPILER_TARGET@"
 #endif