From patchwork Sun Sep 12 15:58:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 509502 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp3101027jai; Sun, 12 Sep 2021 09:09:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznYcTwXzKB3gw/D/FZnpnNNOGZezHUmL/COSN0vtvpeK1i9cIE/8xq4DWH2QN8mwPD2BMu X-Received: by 2002:a9f:3e4c:: with SMTP id c12mr3031117uaj.75.1631462949805; Sun, 12 Sep 2021 09:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631462949; cv=none; d=google.com; s=arc-20160816; b=MNEkuT0Da2B3HXmBNMsQZMxj/EK3RGNG4oFvlEdMG9K+/kIR5gHroIKLeXXzFaEroy XjYOuxrGbc4dWtzjOgfzRFhbezc8O9gTupMaQ0sB54CCUWtmg+E+XR5jH3Rby1jwWkkp vwgYJAii6unMxYtPDreKa8adDbxI3497QVHP/57q4uhuaPTysuMxgTI7/KDIAVgJAjlq qVg5/WKxyjcwr1Q5Y1LfBTtcmJW4w7p63xs5ypH7YKByXSZ+WHkqloSMthefdq2WgNNR R2EGOlU1ZL4UKWJZmUDq6+eVMc+Wwvr80qxNzWu55I10S22dlxQXpVMHxXj1jGfdwxMD xCTQ== 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=efovJs++mTqvDj/v1z/jQbWbDfS+sboDFcs6hswgA8n1IVKTDxJPdmwuXKfN2gdcsN Z+ptGioktvoor0k2JAgQFafbnjqNyoP2l4ZbYSpJ0nXLiubVXgRCFxgphbMgG/hHvdKk 6T8Xt3oQwjJvTjJlpELjfHFZBveZxPo9M55Fx2Dn8n/rwEjw1S6yvaufYuTFy1Nn6xAt scQT5z7YS5yuPalrbWau2ivR954SfsVkWnecygfFusjUcSYI/43wknwZsgWXvK0vxFrG uQNzCYhJDYXFAn45ikGsGsCeSSgTzyyChqP6zbIY3lJSAj1AtD3QzitvHBfFniBG7CFe Vung== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yP51pHcw; 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 73si1068181uan.50.2021.09.12.09.09.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Sep 2021 09:09:09 -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=yP51pHcw; 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]:35636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPS2X-000285-6X for patch@linaro.org; Sun, 12 Sep 2021 12:09:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPRs8-0002ST-2r for qemu-devel@nongnu.org; Sun, 12 Sep 2021 11:58:25 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:33286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPRs1-0003xc-TD for qemu-devel@nongnu.org; Sun, 12 Sep 2021 11:58:23 -0400 Received: by mail-pj1-x1029.google.com with SMTP id mi6-20020a17090b4b4600b00199280a31cbso3735332pjb.0 for ; Sun, 12 Sep 2021 08:58:17 -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=yP51pHcwrmx2oxBxaPl9XGJ8pj+i76hA6At+8sZWguIVn2hF/x9/PWxkAh6URyuZCt fb9Q9Wh1FNC58ihi8vnShAPgORQQz6uCbelqTLte4IasOFpI9fi8d5V33ieVUOQCkXdP 1iSIXq8t3f3augEBnz9q1YAavXG/jzn1Cb2bZKgZu1qPEWEJYLUAOOM10KC8Ht0YiERB 84QmhCA89vOLUVZvE6arskHQjhH9E7nxr90a6ijDYer6vackcZw60k8j7OmHn9LBxSwu 18hFt9+yqUKB2PI1JeBsG8BoWsOu84eDifX0gXHnXxIhn6GZYpv8XFGzff5HTrpTDeE+ 7elg== 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=JeU+DNz+MK+Lqf7WYW9HDzD3uoN0Hh/iPTWB+M73I1FldY9rK/lO0zYsf/vKYu2MHg 3ww4aYFt7wd7GxWLMD+JHNI0A37tVpe5/Ft7fGgacr5c9vjTQ2SHZlMNZ+pz2ltjpm9J SHi/AU1YA4tumjwQwlerFSToaHaSh75m6HoEpELzohITwIRL3D1lK/BrZyyGKkZMzGZh o7mOFAC3b6MOnmaOaI6aEVxq1iyTqsGMmZZOXSRSxl3ilPm9wBBPR3Otg32QavKHu/rW /tO55nmOd2oB3Z8t/QhTWltteqUngbPkniZDOd1OX2TD2ltyJgzzvB9kOpKWNt6KuVsP 4+Gw== X-Gm-Message-State: AOAM533K6DWSBASvXoXPNreTIbgrXlrMW7OIPeZw8W3eHPq+lha1g2Fk J1Fr4UMip1GMmqlC5KIirI7UpqIrW9xw1w== X-Received: by 2002:a17:90b:1102:: with SMTP id gi2mr8195486pjb.43.1631462296624; Sun, 12 Sep 2021 08:58:16 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id v13sm4439415pfm.16.2021.09.12.08.58.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 08:58:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 8/9] tcg/ppc: Ensure _CALL_SYSV is set for 32-bit ELF Date: Sun, 12 Sep 2021 08:58:08 -0700 Message-Id: <20210912155809.196236-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210912155809.196236-1-richard.henderson@linaro.org> References: <20210912155809.196236-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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