From patchwork Mon Jun 19 10:46:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 105817 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp809062qgd; Mon, 19 Jun 2017 03:46:51 -0700 (PDT) X-Received: by 10.31.132.13 with SMTP id g13mr12416279vkd.34.1497869211458; Mon, 19 Jun 2017 03:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497869211; cv=none; d=google.com; s=arc-20160816; b=Aqpxi+Fi+llfffAaZRFVYOQ6ZJRhXY1XHkqHI/UiwuJxJiCoqtqcxtmgR7TxYaMZ/q 1X1VQ1B+gp9+A1mH9gzesJ//hZDRrPoBANQu4EEQ5tQcZdqt1e/1A4t8Aggef+utSrSN hQbo/uEUxtIlGxPSbmLELVkg1sWpa33ldBiVggij2PpQnqRaCGeJJ6rDuDPPfUvJVyCD XF1arv1bLH8qfxHhSzM/tcxM7MgBv/VGneh6vMo4Z5QAlBB+IjUXpe2D3Y9bQZgOExmC SE1UBVEtZv4hqLaciOVcR9LnXCbMqDAXqV/9ZEKsK7Jr6DZzBoyYjQnpimQUR/zTm7xd vWdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=EaXjEPaPU/HwNQabLYoBQXA4+RM8jhO9DSKSt1LRQ0U=; b=tDxxjyo/G/G78cWJYQK2czRrb8D4ytfTkvGhsvvmG6dtdSm80eSP61wylcDMbcM2DN NGfs04yOb+3ehAVpmuglK4K/xUxI5ZP0DZIJERsc8ZITrazA8+Cy2foQpu3nXWyi2a4j oJYIosaMnULu2PmCGuQsfhNgal/I4leEION7ie7Yd/U++8JQ6c50G0jLzhvDnhd8riCk ll57KKaHB+yqqjtu6lc7FjFNt4cWyntAS4a/qKtAWOUABmjl9gYNBiDF6Eox90yO0ulA ip0FTT4FJfChwrApTaPORnj6WItBgFTCnmviBXiFMYMqqdAnTOWKb80s6YAFH608P86i bEUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=UzHmYtVk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 65si4759413uaw.281.2017.06.19.03.46.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Jun 2017 03:46:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=UzHmYtVk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuCp-0007Mp-0C for patch@linaro.org; Mon, 19 Jun 2017 06:46:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuCQ-0007KX-Jh for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMuCN-0004qK-IA for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:26 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:33476) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMuCN-0004q7-BP for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:23 -0400 Received: by mail-wr0-x229.google.com with SMTP id r103so69638948wrb.0 for ; Mon, 19 Jun 2017 03:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EaXjEPaPU/HwNQabLYoBQXA4+RM8jhO9DSKSt1LRQ0U=; b=UzHmYtVkMVKEyVZ7T+tW1+5E1aZnNE16n+aVRrsuD2yva/8wFxl6TakF4boUw3TDDF qUexxwddGqmUbNCeO0NA3lfZpmmq/P9OSRPCCCMoihf9G6zZkzTfvpjc9lvymipcO3AZ oGzxpsQH/HUe9EoT4aWSlxNsIO3GPZRtgC4WQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EaXjEPaPU/HwNQabLYoBQXA4+RM8jhO9DSKSt1LRQ0U=; b=Kvu4ZFPiW+fxXoEecP/PzW09TyVhBPdz8zFc3ERQlG7tF2j7XY834xD4tXDnIcd3TW rB6MPYQPpFS0Im/zagbuUYpzSXxA/Iy1toxzEJvXJfh+WbvAIZUkd97pCyAoChYC3zyZ BQ66RSw8eJYbu3Ay1V8R6DzbDo471WgkOnuQMZs1eNsLYMWT2e4gzhEv747r5a9KD8kP HbmJOc9DfI03JC8sOnS5QDlkSbrQJxqv7t9yUT5aH5CSGlfWBfkVzj8titxtoQNtzh8K iNRBSYG6TAIYWefvsDPM08lEec5oaowcvOO71DgUCKK5x6FLhXf+Fuf8JSrHftC9La85 6gMA== X-Gm-Message-State: AKS2vOxnTPda+EZB5ATMF3dOAdX9nuJPKg4JJsLQzmy1qK4Y/dOMOFwH f3ZxSQKbBBWjEhdKLSqwfw== X-Received: by 10.223.175.204 with SMTP id y12mr10276078wrd.61.1497869182329; Mon, 19 Jun 2017 03:46:22 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id p99sm15890120wrb.6.2017.06.19.03.46.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 03:46:18 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 3D3793E0B2A; Mon, 19 Jun 2017 11:47:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 19 Jun 2017 11:46:46 +0100 Message-Id: <20170619104655.31104-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170619104655.31104-1-alex.bennee@linaro.org> References: <20170619104655.31104-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 Subject: [Qemu-devel] [RISU PATCH v5 04/13] build-all-archs: support --static flag X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- v5 - swap with docker patch so later can be dropped if not wanted --- build-all-archs | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) -- 2.13.0 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