aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-18 17:09:44 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-01-18 22:02:27 +0000
commit64911369ad6605ac234a1c843359586c3adc078d (patch)
tree81317580d7d24df3d10b7bd47b5dc219dd03885c /src
parente58041f242bf4bd120ecc9619b88348d80b94c17 (diff)
Look for plugins in target triplet subdir
Change-Id: I3bab0ab05b4f552ad64392439fb48409ab0ab8c0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-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