From patchwork Tue Sep 14 00:14:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 510384 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1044760jao; Mon, 13 Sep 2021 17:26:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0BaAqEJFzTRyE5DsSAEpV4EwdaGLGDUH7xK5OSl8IuOT7MV8GHOyHlrDIOh7XDh0SmZ2H X-Received: by 2002:a0c:9c47:: with SMTP id w7mr2551276qve.9.1631579192842; Mon, 13 Sep 2021 17:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631579192; cv=none; d=google.com; s=arc-20160816; b=RANFgiMvBvjXYQSS5AsY4EJsoqnY+PzJtKuo/EKQWOPFTbomJfA9Z3A3poJjz2vAn9 tZZDdRL3p0D+GuagRw1EkftBvFDhSEYXNMCSKNHQU/Q1mB02nfcGkJF9ZJ+UUKFuMhD0 WrdGgbjE6NG6vIfxiRUDxEi+EkVngbln3EWY+H6WZoEKaSZUFAWUZSAE4vZ/M4TT6jns M/ODNw2AHBKJjUJoKMg9g1NkOXOXwdrtb9lvwGVOnheJn+XOP3SvfwQqcP8LWK4JcYYU n1vmkkmmwo0LlZmUCWALyS9NBLTwULeR3P1z+4Xa9JVBwkOFTys3z2t7No1v/o0V15At lMpw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=0lgwAN4JLa+eJyUWPeSpGCyCJ0/V+S2YWU/Kqpi1gBQ=; b=v4syN3XhNagrSBCZlsAaUTxgNfB2JAt1xf0+p+bJ6RNvsNxDPevqkJ1kx5gnTm7NfC 5bpZBTA6bEbW+8En0SdtmOHEo/ER2ewxMYcx/ApbNUVE0Erqnz+7c6OxURIC6ES6F47t qf+bxMKj/Wuy+8vOZWkWPYLAazvvoN2BDChHwzW5DUrIXRCgxtXguusEGKXYYhwxz/bC JBcWAZ9T/qlmTWdUd4M0v4mA5rTlw/iDu0FamieNLTzL3WAhNTluNGgulllSZQOEC0ni SJpRGE4hXxTg43BImZSdMP4Gk2YG1ZSXdQ8a3XKhkhphjUG9BgSqFTo84cMAoWfA+0jJ 18EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=buhfcxqL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p3si5974454qtl.132.2021.09.13.17.26.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Sep 2021 17:26:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=buhfcxqL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPwHO-0002An-Fy for patch@linaro.org; Mon, 13 Sep 2021 20:26:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPw6N-0001fz-Fp for qemu-devel@nongnu.org; Mon, 13 Sep 2021 20:15:07 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:46704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPw6K-0007cE-LY for qemu-devel@nongnu.org; Mon, 13 Sep 2021 20:15:07 -0400 Received: by mail-pl1-x630.google.com with SMTP id bg1so6961603plb.13 for ; Mon, 13 Sep 2021 17:15:04 -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=0lgwAN4JLa+eJyUWPeSpGCyCJ0/V+S2YWU/Kqpi1gBQ=; b=buhfcxqLaQjAy+ak4SKns+Dc3NqFS59nntcmX3Qi42s4pMJNaKGdzwqSoCgzbgyzEz hjtspcq1T9sP0UdiZj1xDzgHRFgw7XMIbzUmcs0ph1uMgPCQVPxJzrwpScW/ZWk6417o iUE3Q6KE/H8Pi3HNoFFcUiUTqk5ivyzdO/MDhgjQb3FRHTZmBbbQN5lcQBINxBQSdXwi 9A+Yp0F7TMy+iyQNeb0dU4PZMbFNucV1+3YjNiBgfAdqaD9UcQ4aJQYUKXRFVNUP7bAD gX6MAgIz6aFJPLzPn1tEH4LYRbDfdazrvcWKY84FxvEUzjDV4DwFe5AHqAGZGxg1oHF3 J/Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0lgwAN4JLa+eJyUWPeSpGCyCJ0/V+S2YWU/Kqpi1gBQ=; b=i70XHpwtFaC/i0rsUnzh1SJB/DAYGY/1wx1akXYobjovqo/gOs4/bQYO8Y7TbEPJkr Q9JkoTP8WAL7mqDnCa3VjtRmORQf2wURls7ezKjfLoEoA1MMOypq2ej5UnENc8Q1uliW ysxpQp9jsv8Wazmw8fS6VxOaIuXl9RYsBtsDYG8kTSW32gZ+/BU/CjPDP8vtVNnpGijd f9/ejGrkjkwHbCL1OUZ1dIVdFB+UP4yrnD7xMf4LPwEaRlCzdB3RZbuE1M3B8z+wnS34 Po976BSf5Jq3d9y7OzhRy5KEUd4xP+5MKg5xSrqKamdijtg6hQ6rumwvx/7QuKcBWcJp 7Rmw== X-Gm-Message-State: AOAM531hVPlL7urInl3hepMMy/VmnPZpnOeZj0x9E1/jrQO6YITFCEBF 5+3y2A35LD/r34qlvOoVQKbu3K8kOuBZeQ== X-Received: by 2002:a17:902:6e02:b0:13a:41f5:1666 with SMTP id u2-20020a1709026e0200b0013a41f51666mr12731629plk.39.1631578503312; Mon, 13 Sep 2021 17:15:03 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id m7sm9334179pgn.32.2021.09.13.17.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 17:15:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 07/44] tcg/ppc: Ensure _CALL_SYSV is set for 32-bit ELF Date: Mon, 13 Sep 2021 17:14:19 -0700 Message-Id: <20210914001456.793490-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210914001456.793490-1-richard.henderson@linaro.org> References: <20210914001456.793490-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Brad Smith Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Clang only sets _CALL_ELF for ppc64, and nothing at all to specify the ABI for ppc32. Make a good guess based on other symbols. Reported-by: Brad Smith Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 2202ce017e..5e1fac914a 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -25,9 +25,24 @@ #include "elf.h" #include "../tcg-pool.c.inc" -#if !defined _CALL_DARWIN && defined __APPLE__ -#define _CALL_DARWIN 1 -#endif +/* + * Standardize on the _CALL_FOO symbols used by GCC: + * Apple XCode does not define _CALL_DARWIN. + * Clang defines _CALL_ELF (64-bit) but not _CALL_SYSV (32-bit). + */ +#if !defined(_CALL_SYSV) && \ + !defined(_CALL_DARWIN) && \ + !defined(_CALL_AIX) && \ + !defined(_CALL_ELF) +# if defined(__APPLE__) +# define _CALL_DARWIN +# elif defined(__ELF__) && TCG_TARGET_REG_BITS == 32 +# define _CALL_SYSV +# else +# error "Unknown ABI" +# endif +#endif + #ifdef _CALL_SYSV # define TCG_TARGET_CALL_ALIGN_ARGS 1 #endif