build: provide cross file for arm build accepted/tizen/unified/20200729.165610 submit/tizen/20200728.225405
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Mon, 27 Jul 2020 05:24:24 +0000 (14:24 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 28 Jul 2020 22:37:59 +0000 (07:37 +0900)
arm_build.sh [new file with mode: 0755]
arm_cross.txt [new file with mode: 0644]

diff --git a/arm_build.sh b/arm_build.sh
new file mode 100755 (executable)
index 0000000..cd9bcf6
--- /dev/null
@@ -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/
diff --git a/arm_cross.txt b/arm_cross.txt
new file mode 100644 (file)
index 0000000..927be56
--- /dev/null
@@ -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'
\ No newline at end of file