Skip to content

Commit

Permalink
build: provide cross file for arm build
Browse files Browse the repository at this point in the history
  • Loading branch information
smohantty committed Jul 27, 2020
1 parent 6547245 commit 0a53912
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arm_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Sysroot PATH is not provided"
echo "Usage: arm_build SYSROOT_PATH"
exit 1;
fi

if [ ! -d "./builddir_wasm" ]; then
sed "s|SYSROOT:|$1|g" arm_cross.txt > /tmp/.arm_cross.txt
meson builddir_arm --cross-file /tmp/.arm_cross.txt
fi

sudo ninja -C builddir_arm/
16 changes: 16 additions & 0 deletions arm_cross.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[binaries]
cpp = 'SYSROOT:/bin/arm-none-linux-gnueabihf-g++'
ar = 'SYSROOT:/bin/arm-none-linux-gnueabihf-ar'

[properties]
root = 'SYSROOT:'
shared_lib_suffix = 'so'
static_lib_suffix = 'so'
shared_module_suffix = 'so'
exe_suffix = 'exe'

[host_machine]
system = 'arm'
cpu_family = 'arm'
cpu = 'armv7l'
endian = 'little'

0 comments on commit 0a53912

Please sign in to comment.