From patchwork Thu Jun 21 06:25:12 2018 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: 139451 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1672069lji; Wed, 20 Jun 2018 23:28:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4J80hw+9tLiC05KWzhY1mgFbIFawOCLjDslVE0IAa/SkYbUeirMONBE2WKBAp0w2kEeSM X-Received: by 2002:a37:1121:: with SMTP id b33-v6mr19863543qkh.64.1529562539488; Wed, 20 Jun 2018 23:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529562539; cv=none; d=google.com; s=arc-20160816; b=udDo0b00oRNXpHIHd2GLBY1vc+3RA5JuEOrvb9yVfvt6nXlWbUMQ5sW8NDNtKVVcOJ Ujt5aeuj8vqFBzym1vert3KbCCLyzM4JDWrigsYQVYxNcmI4cjX6MhYcYl2bi6pMCvGy yjIY2R/9rkWoPj6zQ5P1M4L8CtBDGgaKJ2w3UPfuCefOQZngYNiceUBoO3c+aHAHJtSZ yYw5FSSMmnBm57Rj3Wyn1i0bRay7eNsXUFMSh1bP87mQaOPirkVCZvDp+8vAGp4IVdSY McJD8VkPP4HCNfaZI5r4mxwiu1yQQHjWt9A+KUG7x8Lviwznz8iH6EsNKShSFu5d73/C jDPA== 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=Da/ilI/Ax6fdH9dAAEOqQ7okua12KtecGlbgc4Vc2Rw=; b=Dr1G+2lPxO/8jPblmqpkv1BDFYKo5xaZaaK7yRDwG/Cc5r9VdeLBxJMstC8HK2RGzE QpBOZAVTHajMqGOI1FrNRo9YPAHkJ3yH/v8ANYEXPLUbMa3IZS01ho59BWOmcR7VWQG5 WucWw7KIO5qweB0IK1y0sW6lWGaqMUY1DYJrmd2h78jVHdHqdbskJ5WRKXkVFS0SLIPu +WF4Ja06ElFFCtb2ETMtMHGLPo1PmDnVAdcYpYn9wuaQ0MliWIpul3R6zk7oVOZbJuQF 5xRJxlBDaRhCHwh78jVet2kuMygEe2lUbUyurDbw59EybrP/hFTj9H9sC1CZXJYDSAhn /ddw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eD8rqpST; 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 j12-v6si1901818qvk.13.2018.06.20.23.28.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Jun 2018 23:28:59 -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.s=google header.b=eD8rqpST; 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]:53250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVt5W-0003AE-Si for patch@linaro.org; Thu, 21 Jun 2018 02:28:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVt2p-0000sr-Bc for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:26:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVt2o-0000XI-4A for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:26:11 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:39777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVt2n-0000WK-TH for qemu-devel@nongnu.org; Thu, 21 Jun 2018 02:26:10 -0400 Received: by mail-wr0-x244.google.com with SMTP id w7-v6so1812681wrn.6 for ; Wed, 20 Jun 2018 23:26:09 -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=Da/ilI/Ax6fdH9dAAEOqQ7okua12KtecGlbgc4Vc2Rw=; b=eD8rqpSTx651loYa2z8QuPerZGIECouNp+BHPaMH65tv9Pa0GDNd7u3pdxIDiLT/j4 8f0fxzsA19UAyhnfnlZU89Nt+XdVIn0pal03dK+EBqHxUxvJo1CoYBT8SO93MvqbHVbx /1A9FA4fgvQhZoJFlnRLE+9lEkom0KH93Uc+k= 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=Da/ilI/Ax6fdH9dAAEOqQ7okua12KtecGlbgc4Vc2Rw=; b=M2WyLqh48XZvECloNKEn1i31oszrHtB6wuqRzK0Fii1+lhHe9/2Eg8u9nwldJfti5h Ok3eABnJhG9L02HkIwHv7qOWWNB5uIiGesYdyMll9Mp1MFNwxdEtOVB9Bh7YpUFwWHsy Fr7CUobRkRdCrTLFw7Kk9mqHFdV8Mv420Wwes3XoNQzbppDCxyUijXveMsbcMIZMoSf3 j4SMD5ipEjjvU4a+whUO9PYWRbq5CBwSvmNdce8m7FG0bvvLdNSWMONqI2dIU1oSYOeH e4B9Vafl+7wwSiS7Fg1CnXid0SxosCWmM/Zzm4dl2TH5L0l17xCF0HLTuGWICGkMoP1S 9Hkw== X-Gm-Message-State: APt69E2glS7F6u8ZSTh+lLynJY9+M9xJW30aNr9KhehGRJ1Xf/oP/81y K/4qOROf1y6vFvI78lDJK9fI/VXj/7w= X-Received: by 2002:adf:8f23:: with SMTP id p32-v6mr19799010wrb.193.1529562368879; Wed, 20 Jun 2018 23:26:08 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i14-v6sm702507wrp.24.2018.06.20.23.26.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 23:26:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 9E7623E07DD; Thu, 21 Jun 2018 07:26:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 21 Jun 2018 07:25:12 +0100 Message-Id: <20180621062605.941-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180621062605.941-1-alex.bennee@linaro.org> References: <20180621062605.941-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::244 Subject: [Qemu-devel] [PULL v2 04/57] configure: allow user to specify --cross-cc-cflags-foo= 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: agraf@suse.de, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, famz@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" As an individual compiler may be able to support several targets with the appropriate flags we need to expose this to the user as well. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson -- 2.17.1 diff --git a/configure b/configure index a5676cf15f..259938e177 100755 --- a/configure +++ b/configure @@ -459,10 +459,14 @@ docker="no" # cross compilers defaults, can be overridden with --cross-cc-ARCH cross_cc_aarch64="aarch64-linux-gnu-gcc" +cross_cc_aarch64_be="$cross_cc_aarch64" +cross_cc_cflags_aarch64_be="-mbig-endian" cross_cc_arm="arm-linux-gnueabihf-gcc" +cross_cc_cflags_armeb="-mbig-endian" cross_cc_i386="i386-pc-linux-gnu-gcc" cross_cc_cflags_i386="" cross_cc_powerpc="powerpc-linux-gnu-gcc" +cross_cc_powerpc="powerpc-linux-gnu-gcc" enabled_cross_compilers="" @@ -498,6 +502,9 @@ for opt do ;; --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO option" ;; + --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*} + eval "cross_cc_cflags_${cc_arch}=\$optarg" + ;; --cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*} eval "cross_cc_${cc_arch}=\$optarg" ;; @@ -1527,6 +1534,7 @@ Advanced options (experts only): --extra-cxxflags=CXXFLAGS append extra C++ compiler flags QEMU_CXXFLAGS --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS --cross-cc-ARCH=CC use compiler when building ARCH guest test cases + --cross-cc-flags-ARCH= use compiler flags when building ARCH guest tests --make=MAKE use specified make [$make] --install=INSTALL use specified install [$install] --python=PYTHON use specified python [$python] @@ -6883,6 +6891,7 @@ case "$target_name" in mttcg="yes" gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_compiler=$cross_cc_arm + eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}" ;; aarch64|aarch64_be) TARGET_ARCH=aarch64 @@ -6891,6 +6900,7 @@ case "$target_name" in mttcg="yes" gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_compiler=$cross_cc_aarch64 + eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}" ;; cris) target_compiler=$cross_cc_cris