aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-12-28 01:45:57 +0300
committerCem Keylan <cem@ckyln.com>2020-12-28 01:45:57 +0300
commit404cc97c9318b7491dd20b7af501146310372e97 (patch)
tree20a62ca106425203efff84a2ab943984fedbbab7
parentb02a1ceae92caa07a66a253b776071ad83920f34 (diff)
downloadrepository-404cc97c9318b7491dd20b7af501146310372e97.tar.gz
redo: fix cross build
-rwxr-xr-xcore/redo/build9
1 files 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