From patchwork Wed Oct 23 15:45:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1182309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="C9frGU0A"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46yxJ95DtKz9sNx for ; Thu, 24 Oct 2019 03:52:41 +1100 (AEDT) Received: from localhost ([::1]:41694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNJsE-0005nj-O1 for incoming@patchwork.ozlabs.org; Wed, 23 Oct 2019 12:52:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42528) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNIp3-0004iF-16 for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:45:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNIp1-0005Ws-Nx for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:45:16 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:34108) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNIp0-0005Pr-W2 for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:45:15 -0400 Received: by mail-qt1-x833.google.com with SMTP id e14so13184339qto.1 for ; Wed, 23 Oct 2019 08:45:12 -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=/AKbLHXTnM8m/9emDbjfL8Myv0gqqIqdV5s6THzE+7U=; b=C9frGU0AzZ7BnyrHTHH9SfZnuJGxFsRol9ai81q7DPmj+TZAlXLm2UZJm1RyH591z4 uGtpGcZmP3LxSQZk4vwhzXR2j3m14aMX9C4R7o6pFultK4PKS1mFHKpThXsaobnmb7kb fYBS4sU9N+CPR45APZke8b9i+cfu3Ox4akvLQlzMfbVk/qcp5+wqdK3y1gCh4VQ0ax3c jvf5pUy/0suRMmJqADyg7MYg5hHKroeOp33XJocDZ8eSNz0kFUbHPWppmeHtjV4VYpxd 5keHgySgfUuS0Xc/RL45RzxkxoHC8LQohSYw2thj96dFav8KvCPv2PtkbGJqsXN4ivAp uLxQ== 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=/AKbLHXTnM8m/9emDbjfL8Myv0gqqIqdV5s6THzE+7U=; b=OlUbLE5fshO9Xpy8qf6kQQ7N6VEYBxFMzSY4h1vrNoQEsl3Tkyj9zBlrQzZSRT/Fa0 tpYx0ZSsRbUohfj0/juwxGeCqIx8bvxFTTUhg/iSyFsbmg944sLyHm/hN2WbWIPdpNLq /VwUNIB/iMBHOEPWjmhkIPBaj4GGbu3N33zgpUslx68GUJKGP5x035WE6VVOSdHkmc91 FilnK4t86HPTtx+u0TkJxWucxECGW48ECVHi1rMbgyue7rV36qKx20lPFD6PGMXCZsIh YVT9sE3o4kSsAcamkVSmxjUiZmpED3DH0pQRLcj0uXzyXEPUKWOE5W+wt+NYkdJkz07+ M7vA== X-Gm-Message-State: APjAAAW9xyRjoSWnrBYqRZuZBCHWNlN61APpL34rsQ1K4YEYmVH9ps1l ECeQKiLxjIVr9/xFoCdSwmHf7ZG0QrY= X-Google-Smtp-Source: APXvYqyVks026fWC02gOchDmwaZKGKv5LNjSigxBXb9gMxFgvtwYNxLXjuq1jTL0I5PdtBZgEXRopQ== X-Received: by 2002:aed:3225:: with SMTP id y34mr9955341qtd.353.1571845511156; Wed, 23 Oct 2019 08:45:11 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-50.nyc.biz.rr.com. [172.254.253.50]) by smtp.gmail.com with ESMTPSA id o1sm2456272qtb.82.2019.10.23.08.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 08:45:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 3/7] configure: Detect compiler support for __attribute__((alias)) Date: Wed, 23 Oct 2019 11:45:01 -0400 Message-Id: <20191023154505.30521-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191023154505.30521-1-richard.henderson@linaro.org> References: <20191023154505.30521-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::833 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: pbonzini@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Such support is present almost everywhere, except for Xcode 9. It is added in Xcode 10, but travis uses xcode9 by default, so we should support it for a while yet. Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 145fcabbb3..3a9862fe5e 100755 --- a/configure +++ b/configure @@ -5518,6 +5518,21 @@ if compile_prog "" "" ; then vector16=yes fi +######################################## +# See if __attribute__((alias)) is supported. +# This false for Xcode 9, but has been remedied for Xcode 10. +# Unfortunately, travis uses Xcode 9 by default. + +attralias=no +cat > $TMPC << EOF +int x = 1; +extern const int y __attribute__((alias("x"))); +int main(void) { return 0; } +EOF +if compile_prog "" "" ; then + attralias=yes +fi + ######################################## # check if getauxval is available. @@ -7083,6 +7098,10 @@ if test "$vector16" = "yes" ; then echo "CONFIG_VECTOR16=y" >> $config_host_mak fi +if test "$attralias" = "yes" ; then + echo "CONFIG_ATTRIBUTE_ALIAS=y" >> $config_host_mak +fi + if test "$getauxval" = "yes" ; then echo "CONFIG_GETAUXVAL=y" >> $config_host_mak fi