Closed widgetii closed 2 years ago
Previous recipe required libstdc++
as dependency and will take of 1729Kb of space. If there is no other application in the system which require libstdc++
one can build mavlink-routerd
with static-linked libstc++
diff --git a/src/meson.build b/src/meson.build
index 086ce9a..f9cb411 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -23,6 +23,7 @@ exe_mavlink_router = executable('mavlink-routerd',
],
link_with: libcommon_private,
install: true,
+ link_args : '-static-libstdc++'
)
if dep_gtest.found()
Final mavlink-routerd
size is 1006Kb
introduced in #269
Please consider adding mavlink router to fpv profile.
This software uses Meson+Ninja build system (can be installed on build machine by
sudo apt install git meson ninja-build
Then use build instructions, adjusted for cross-compilation (as example of EV300 system):
Target binary for IPC will be located at
./build/src/mavlink-routerd
. Make sure thatlibstdc++.so.6
dependency is also copied to the target. Consumed size data:meson-cross-arm-openipc-linux-musleabi.ini.zip