[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RISU PATCH v5 04/13] build-all-archs: support --static fla
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [RISU PATCH v5 04/13] build-all-archs: support --static flag |
Date: |
Mon, 19 Jun 2017 11:46:46 +0100 |
Signed-off-by: Alex Bennée <address@hidden>
---
v5
- swap with docker patch so later can be dropped if not wanted
---
build-all-archs | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/build-all-archs b/build-all-archs
index 2768727..581a1b4 100755
--- a/build-all-archs
+++ b/build-all-archs
@@ -14,6 +14,38 @@
# So we notice risugen failing even though it's in a pipeline
set -o pipefail
+# Simple usage
+usage() {
+ cat <<-EOF
+ Usage: $0 [options]
+
+ Options include:
+ --static build a static binary
+
+EOF
+ exit 1
+}
+
+while [[ "$1" = -* ]]; do
+ opt="$1"; shift
+ arg=
+ if [[ "$opt" = *=* ]]; then
+ arg="${opt#*=}"
+ opt="${opt%%=*}"
+ fi
+ case "$opt" in
+ --static)
+ CONF="--static"
+ ;;
+ --help)
+ usage
+ ;;
+ *)
+ usage
+ ;;
+ esac
+done
+
# Debian stretch and Ubuntu Xenial have cross compiler packages for
# all of these:
# gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu gcc-m68k-linux-gnu
@@ -36,7 +68,7 @@ for triplet in aarch64-linux-gnu arm-linux-gnueabihf
m68k-linux-gnu \
rm -rf build/${triplet}
mkdir -p build/${triplet}
- (cd build/${triplet} && CROSS_PREFIX="${triplet}-" ../../configure)
+ (cd build/${triplet} && CROSS_PREFIX="${triplet}-" ../../configure
${CONF})
make -C build/${triplet} EXTRA_CFLAGS=-Werror
done
--
2.13.0
- [Qemu-devel] [RISU PATCH v5 00/13] RISU record/replay patches, Alex Bennée, 2017/06/19
- [Qemu-devel] [RISU PATCH v5 01/13] .gitignore: ignore build directories, Alex Bennée, 2017/06/19
- [Qemu-devel] [RISU PATCH v5 02/13] README: document the coding style used for risu, Alex Bennée, 2017/06/19
- [Qemu-devel] [RISU PATCH v5 04/13] build-all-archs: support --static flag,
Alex Bennée <=
- [Qemu-devel] [RISU PATCH v5 05/13] build-all-archs: support cross building via docker, Alex Bennée, 2017/06/19
- [Qemu-devel] [RISU PATCH v5 07/13] risu: paramterise send/receive functions, Alex Bennée, 2017/06/19
- [Qemu-devel] [RISU PATCH v5 06/13] risu: a bit more verbosity when starting, Alex Bennée, 2017/06/19