From patchwork Fri Jun 15 19:46:14 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: 138776 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1261728lji; Fri, 15 Jun 2018 13:03:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI0S4soKMKlSWOVnfEWgyMVY3pvuXpTFDvrraWgZ7h7gWG9ZxvX2mAZtWgYZB35nNaKdPt9 X-Received: by 2002:a0c:d8dd:: with SMTP id w29-v6mr2761412qvj.40.1529093013816; Fri, 15 Jun 2018 13:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529093013; cv=none; d=google.com; s=arc-20160816; b=udrbCNMzimn3azK88Z2/RN34hAyydaA2AnBj1xvh8PCXHKh7UKNRrym6cRuOQZaM9V JEZZ9HqraoOHfZswERt3OEyQC8xQMiiyiuDQn/Jvkk87XvTEMJV8E5YNwMYBQsZ6pqEE WIwcUZmyGgUXX3SXCJSKj+Y1O8vXZiKCsVct781AdsrpPd04D4EB+794+2r2Xr3gpO2j iY7PAGvXyJy9JTsE8wxgeCW7a0UxwFNrDDq3La09LfW0jXomRgz0vffsbjYsr/5raPgg fS+TyGwb6zJ0anP0Bf7MBDhVu4OYG3JVbFnHVHSFzbZHvvq61HZxfNDYEvQmoWzAoeTv WovQ== 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=glSVr0j47nXBbvI7H7XtFSmCUOPHKS8hzVhxOiOtre4=; b=bPG83m5e6pby6VMXU05vpT7alM5Gjl9ClEXsSBjM9Sn4SLFidsAu9KCVpXd4xFqjJx HJsQ4eky4ZlUL1kqJtO21Ot/6odOVaWA806kxo8wSJRowR+zVKzaGtKt3Uxi8eJtSfoF G6NysaJxJI0jLsHNOGM/ddRWis0oC8ZFwr1v3gNWmCtt82/puk30T7H/1h7UD2JdkUHm v8g1qP/2rpvWJjjEs2fN2Dg6284u7THUNswnzd624+8FlkNitTALl6wDZWk3ncAqeLHr tt7JRqozzJUqoKXcgEymMPKDotfb+huXLbkWjrlrBYvIz+hqUvSPNeduBKBmvbV0FMdt BIdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=T0gkWqzw; 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 z186-v6si1067191qkc.402.2018.06.15.13.03.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 15 Jun 2018 13:03:33 -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=T0gkWqzw; 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]:49062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTuwX-0007Tr-AW for patch@linaro.org; Fri, 15 Jun 2018 16:03:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTugj-0002Ua-DT for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTugf-0005DV-GN for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:13 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:38260) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTugf-0005C6-9Z for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:09 -0400 Received: by mail-wm0-x244.google.com with SMTP id 69-v6so5710796wmf.3 for ; Fri, 15 Jun 2018 12:47: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=glSVr0j47nXBbvI7H7XtFSmCUOPHKS8hzVhxOiOtre4=; b=T0gkWqzwpJqcBOVPWsRX3o1M310dPMy4UnedzhH5b5dx4tR6BLhg13kMFSRJAgQNYK eH6ce6AcRS9to2rGFb37koOj60UWq+QzsRtNWho/2b0YWcf3n039YXXMecYJ3Zw66jac XwXZd5pT78NchnpqsKvdowZJzKhZOQ/5+H74M= 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=glSVr0j47nXBbvI7H7XtFSmCUOPHKS8hzVhxOiOtre4=; b=rTc49s2ZYV+XJycGITDwTJwjQ6dk5xZ4ruX+rgvD0/m26AG3aPgIqI+ODekDtDY63w ThMy925USfgdVhhz8Ar54H5KcNYOPViRiG4jP0tjQ1wIt7/iH1OuO6PXyOs9+PafzOJn rrsNlskwGTyGq+3d7qbZd+ByE3PeRcqGy7UWg4XR7LoyrdLNUZ6mmSgyhoeLs4oGwxr7 LghM3xMg1djPui44yazRhLtrWQTQY0/Fcj7mqq9kmq0yyGNbmX3gMfxI9N/lqEZtE75l UCmpM2NJY64Gwrn3aP7Otf58U6sEftFpRS4tiwW53hnnz8ZA34HD5MqPrl6wFFkIeAN4 xcIg== X-Gm-Message-State: APt69E17u4dzcqFd9kDD9lVG2YkowctkEqHcZOrplIAVv5iUhNFUjNir yCh4ZD+EZsPTC1wEAuk0xjg5Zg== X-Received: by 2002:a1c:1414:: with SMTP id 20-v6mr2120048wmu.119.1529092028159; Fri, 15 Jun 2018 12:47:08 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id z14-v6sm1784952wma.11.2018.06.15.12.47.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jun 2018 12:47:06 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id ABCAB3E0451; Fri, 15 Jun 2018 20:47:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de, peter.maydell@linaro.org Date: Fri, 15 Jun 2018 20:46:14 +0100 Message-Id: <20180615194705.28019-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180615194705.28019-1-alex.bennee@linaro.org> References: <20180615194705.28019-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:c09::244 Subject: [Qemu-devel] [PATCH v7 03/54] 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org 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 --- v3 - fix up the cross-cc v4 - add --help text - sort cross_cc_foo lines --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.17.1 diff --git a/configure b/configure index 6e33dbbe10..b96017b423 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] @@ -6882,6 +6890,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 @@ -6890,6 +6899,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