From 404cc97c9318b7491dd20b7af501146310372e97 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Mon, 28 Dec 2020 01:45:57 +0300 Subject: redo: fix cross build --- core/redo/build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/redo/build b/core/redo/build index cfc0450a..c27b9c0b 100755 --- a/core/redo/build +++ b/core/redo/build @@ -1,9 +1,12 @@ #!/bin/sh -e -"${CC:=cc}" -Os -Wall -Wextra -Wwrite-strings -c -o redo.o redo.c -"$CC" -static -o redo redo.c +[ "$CPT_CROSS_TRIPLET" ] && CC=$CPT_CROSS_TRIPLET-cc -for file in redo redo-sources redo-targets; do +mkdir -p "$1/usr/bin" + +"${CC:=cc}" -static -Os -Wall -Wextra -Wwrite-strings -o "$1/usr/bin/redo" redo.c + +for file in redo-sources redo-targets; do install -Dm755 "$file" "$1/usr/bin/$file" done -- cgit v1.2.3