From nobody Mon Nov 10 14:21:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1556750428; cv=none; d=zoho.com; s=zohoarc; b=hb9YOQxx0jlHTmlpsi8WdwV7sf9Ki9BjWRk/QRfAxTGC9ALYtteYSx0BeBz+P8QbgqluLbu8sjBho5bSUiIaQl/4TWuxFiye0wFtffF1iOWmu7JzOvJIehQIeOUvRYVm1nzSuS+Motne4KvMGEYKx0j9pP4xb7LMQi4QIRPQoEc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556750428; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Y8fpOx1lHam9DoAyom3Eo+rGp2qFykY2yeJeOtgf3Ew=; b=MAtrMV5BdrGG0bZB4jGe0cdnCzJXzl6fCFwid/Lpv4yuQxnUZrsCZzDcROTVVxJFuvk0JoLok9kyzuljl4STG2wjSqfQ1xWZEMiw5/wWWQEfPup19NZVjE2pfyYJy0ydTwauLQdej0f81TAUCGFe2T6w1uvr8UoOihQBX3jx2Fk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 155675042802193.0926885882086; Wed, 1 May 2019 15:40:28 -0700 (PDT) Received: from localhost ([127.0.0.1]:42256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLxtd-0002rc-Ig for importer@patchew.org; Wed, 01 May 2019 18:40:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLxs2-0001z7-DJ for qemu-devel@nongnu.org; Wed, 01 May 2019 18:38:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLxs0-0007xl-5q for qemu-devel@nongnu.org; Wed, 01 May 2019 18:38:33 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:38034) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLxrw-0007uz-KU for qemu-devel@nongnu.org; Wed, 01 May 2019 18:38:28 -0400 Received: by mail-pf1-x444.google.com with SMTP id 10so121951pfo.5 for ; Wed, 01 May 2019 15:38:23 -0700 (PDT) Received: from localhost.localdomain (97-113-189-189.tukw.qwest.net. [97.113.189.189]) by smtp.gmail.com with ESMTPSA id s85sm70603354pfa.23.2019.05.01.15.38.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 May 2019 15:38:21 -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; bh=Y8fpOx1lHam9DoAyom3Eo+rGp2qFykY2yeJeOtgf3Ew=; b=fm+bUfb7Y1LLRDVpMTda564BIcXlm15uLrPKYh2AqyVXXSnwmucJ4DIbgAwiHmVDMb Rnot9c+84HkJ7YQIEblxUiYN2wKjb5WmSLzWf6hFa893ZTBTzBDQu+f3vfGYPUBWNwVQ wfEbs3k1Ekyo1ahkmnvy6lUi//qQl5FjhSaMnyVHTz9AMFZ9NVjXKpH34I5W8RtZHjPS ZgRCWNueyXZ++Q7E6YK7lnzs6aqsCJ8u/xje4MFsm5mumj6v0Iv9wQN+T7hucY5bmrXQ ctWEwJ/WMaD5iVaTae0a9IqsJ8gGbDx901rd7Qkxj2KSD2S8I4r4U1GREJBrMMNIYUFr yKHg== 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; bh=Y8fpOx1lHam9DoAyom3Eo+rGp2qFykY2yeJeOtgf3Ew=; b=sA3w4EP6NfopOzk/HyCMdzQYwa1BBlAb0YBWEq0uf1XJgycuk4nWLHS2+xCZO7yCA7 GCrGbJ9C8Bmz/HFTCGPZCV83GbOrRgtrDvoPIUzqpKuHPkHVFz6YbNmUOJZhbnd5t28D Mi+Wy93d9H7qInv5Sla2MbZ8D6WjuNdu0jxDb9Th7tXRsqFKVGfdy/2EQl11tzQv5Vff kNWD8nmeifzEklqRPFvq619AQlrIK1fJT+9ZQhECcY5NjfOaKlWvhB8tMfAVG18B7A7x HSh24KAg6ah6aVoE6Bl6PxiGNFs6Sj1skOmDDsDCJ40XJJzQUOgYJqgR9GvkKzhhUY3T 02hQ== X-Gm-Message-State: APjAAAUBGkIOTfkjjH8788lkNkDibOh7Q6o8RUpVxGX/i8xzaSQiCIXM 5HMN8Cgc8PQGaR04+z2l97p1LG6umLA= X-Google-Smtp-Source: APXvYqwsZxLCOhsN+HXlU+lV7jEXSlt9MqMKhchjWRoOAF3L6Xv0hSF9vHqr64FX7JtjFBgC0FEIUQ== X-Received: by 2002:a63:fa46:: with SMTP id g6mr506876pgk.382.1556750302695; Wed, 01 May 2019 15:38:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 1 May 2019 15:38:18 -0700 Message-Id: <20190501223819.8584-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190501223819.8584-1-richard.henderson@linaro.org> References: <20190501223819.8584-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [PATCH 1/2] configure: Distinguish ppc64 and ppc64le hosts 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: qemu-ppc@nongnu.org, mark.cave-ayland@ilande.co.uk, alex.bennee@linaro.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We cannot use the ppc64le host compiler to build ppc64(be) guest code. Clean up confusion between cross_cc_powerpc and cross_cc_ppc; make use of the cflags variable as well. Signed-off-by: Richard Henderson --- configure | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 60719ddcc5..234cb929ca 100755 --- a/configure +++ b/configure @@ -198,7 +198,7 @@ supported_kvm_target() { i386:i386 | i386:x86_64 | i386:x32 | \ x86_64:i386 | x86_64:x86_64 | x86_64:x32 | \ mips:mips | mipsel:mips | \ - ppc:ppc | ppc64:ppc | ppc:ppc64 | ppc64:ppc64 | \ + ppc:ppc | ppc64:ppc | ppc:ppc64 | ppc64:ppc64 | ppc64:ppc64le | \ s390x:s390x) return 0 ;; @@ -502,8 +502,11 @@ cross_cc_arm=3D"arm-linux-gnueabihf-gcc" cross_cc_cflags_armeb=3D"-mbig-endian" cross_cc_i386=3D"i386-pc-linux-gnu-gcc" cross_cc_cflags_i386=3D"" -cross_cc_powerpc=3D"powerpc-linux-gnu-gcc" -cross_cc_powerpc=3D"powerpc-linux-gnu-gcc" +cross_cc_ppc=3D"powerpc-linux-gnu-gcc" +cross_cc_cflags_ppc=3D"-m32" +cross_cc_ppc64=3D"powerpc-linux-gnu-gcc" +cross_cc_cflags_ppc64=3D"-m64" +cross_cc_ppc64le=3D"powerpc64le-linux-gnu-gcc" =20 enabled_cross_compilers=3D"" =20 @@ -700,7 +703,11 @@ elif check_define __sparc__ ; then fi elif check_define _ARCH_PPC ; then if check_define _ARCH_PPC64 ; then - cpu=3D"ppc64" + if check_define _LITTLE_ENDIAN ; then + cpu=3D"ppc64le" + else + cpu=3D"ppc64" + fi else cpu=3D"ppc" fi @@ -731,10 +738,14 @@ ARCH=3D # Note that this case should only have supported host CPUs, not guests. case "$cpu" in ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64) - cpu=3D"$cpu" supported_cpu=3D"yes" eval "cross_cc_${cpu}=3D\$host_cc" ;; + ppc64le) + ARCH=3D"ppc64" + supported_cpu=3D"yes" + cross_cc_ppc64le=3D$host_cc + ;; i386|i486|i586|i686|i86pc|BePC) cpu=3D"i386" supported_cpu=3D"yes" @@ -1525,8 +1536,8 @@ case "$cpu" in ppc) CPU_CFLAGS=3D"-m32" LDFLAGS=3D"-m32 $LDFLAGS" - cross_cc_powerpc=3D$cc - cross_cc_cflags_powerpc=3D$CPU_CFLAGS + cross_cc_ppc=3D$cc + cross_cc_cflags_ppc=3D"$CPU_CFLAGS" ;; ppc64) CPU_CFLAGS=3D"-m64" @@ -2379,7 +2390,7 @@ if test "$seccomp" !=3D "no" ; then arm|aarch64) libseccomp_minver=3D"2.2.3" ;; - ppc|ppc64|s390x) + ppc|ppc64|ppc64le|s390x) libseccomp_minver=3D"2.3.0" ;; *) @@ -6160,7 +6171,7 @@ if { test "$cpu" =3D "i386" || test "$cpu" =3D "x86_6= 4"; } && \ fi done fi -if test "$cpu" =3D "ppc64" && test "$targetos" !=3D "Darwin" ; then +if test "$ARCH" =3D "ppc64" && test "$targetos" !=3D "Darwin" ; then roms=3D"$roms spapr-rtas" fi =20 @@ -7345,7 +7356,7 @@ if test "$linux" =3D "yes" ; then i386|x86_64|x32) linux_arch=3Dx86 ;; - ppc|ppc64) + ppc|ppc64|ppc64le) linux_arch=3Dpowerpc ;; s390x) @@ -7506,7 +7517,8 @@ case "$target_name" in ;; ppc) gdb_xml_files=3D"power-core.xml power-fpu.xml power-altivec.xml power-= spe.xml" - target_compiler=3D$cross_cc_powerpc + target_compiler=3D$cross_cc_ppc + target_compiler_cflags=3D"$cross_cc_cflags_ppc" ;; ppc64) TARGET_BASE_ARCH=3Dppc @@ -7514,6 +7526,7 @@ case "$target_name" in mttcg=3Dyes gdb_xml_files=3D"power64-core.xml power-fpu.xml power-altivec.xml powe= r-spe.xml power-vsx.xml" target_compiler=3D$cross_cc_ppc64 + target_compiler_cflags=3D"$cross_cc_cflags_ppc64" ;; ppc64le) TARGET_ARCH=3Dppc64 @@ -7529,7 +7542,8 @@ case "$target_name" in TARGET_ABI_DIR=3Dppc echo "TARGET_ABI32=3Dy" >> $config_target_mak gdb_xml_files=3D"power64-core.xml power-fpu.xml power-altivec.xml powe= r-spe.xml power-vsx.xml" - target_compiler=3D$cross_cc_ppc64abi32 + target_compiler=3D$cross_cc_ppc + target_compiler_cflags=3D"$cross_cc_cflags_ppc" ;; riscv32) TARGET_BASE_ARCH=3Driscv --=20 2.17.1