diff options
author | Canop <cano.petrole@gmail.com> | 2020-06-30 15:30:31 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-06-30 15:30:31 +0200 |
commit | 353597e5fc0814ab3449caead5b878bba73e333f (patch) | |
tree | 96d37a6e4870e2c17fbe84037575ad57045e2926 /compile-all-targets.sh | |
parent | 282107704362f3c000c93bc0eb1b89229028422e (diff) |
base cross-compilation on the cross tool
It's much easier to maintain across distribution update
Diffstat (limited to 'compile-all-targets.sh')
-rwxr-xr-x | compile-all-targets.sh | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/compile-all-targets.sh b/compile-all-targets.sh index 2209ffa..03600de 100755 --- a/compile-all-targets.sh +++ b/compile-all-targets.sh @@ -28,21 +28,15 @@ mkdir build/completion cp "$(broot -c ":gi;release;:focus;broot.bash;:parent;:pp" target)/"* build/completion # build the windows version -# You need first to install the proper cargo toolchain: -# rustup target add x86_64-pc-windows-gnu -# sudo apt install mingw-w64 +# use cargo cross echo "compiling the Windows version" -cargo build --target x86_64-pc-windows-gnu --release -mkdir build/x86_64-pc-windows-gnu/ +cross build --target x86_64-pc-windows-gnu --release +mkdir build/x86_64-pc-windows-gnu cp target/x86_64-pc-windows-gnu/release/broot.exe build/x86_64-pc-windows-gnu/ -# build the Raspberry version -# In order for this to work, you need to install the proper cargo toolchain -# and a linker: -# rustup target add armv7-unknown-linux-gnueabihf -# sudo apt-get install gcc-8-multilib-arm-linux-gnueabihf -echo "compiling the Raspberry version" -cargo build --target armv7-unknown-linux-gnueabihf --release +# build the Raspberry version +# use cargo cross +cross build --target armv7-unknown-linux-gnueabihf --release mkdir build/armv7-unknown-linux-gnueabihf cp target/armv7-unknown-linux-gnueabihf/release/broot build/armv7-unknown-linux-gnueabihf/ |