aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/vpp/vnet/main.c6
-rw-r--r--src/vppinfra/config.h.in2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b404b5069b4..59da1fef1b8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
index 41f70d0c8f1..6819ae6a3a4 100644
--- a/src/vpp/vnet/main.c
+++ b/src/vpp/vnet/main.c
@@ -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;
}
diff --git a/src/vppinfra/config.h.in b/src/vppinfra/config.h.in
index 58a973144e0..a7a22a6a992 100644
--- a/src/vppinfra/config.h.in
+++ b/src/vppinfra/config.h.in
@@ -21,4 +21,6 @@
#endif
#define USE_DLMALLOC @DLMALLOC@
+
+#define CLIB_TARGET_TRIPLET "@CMAKE_C_COMPILER_TARGET@"
#endif