From patchwork Thu May 4 13:58:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 68751 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9A303858C78 for ; Thu, 4 May 2023 13:59:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9A303858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1683208751; bh=KcThXS+QcuZMxbKMlTvKIa/uGwyk3cdhV51TOKquwTo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gpna8rUCyqO0DsoHC/KKmoyNbYvyEkdMv1KDhD5KQz+/H37hdn1Nyo415GvApaslS dCZbq2eMKYMYCUggFpEyIeFtI/BG+T0FJoCw30sno1ilWQzVSWx8hnwcrdjyjmOdCF tnrANQe3C9jGCsORwpJRAPHo0q0mbRV5G68klxmQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2076.outbound.protection.outlook.com [40.107.104.76]) by sourceware.org (Postfix) with ESMTPS id 6D6043858D33 for ; Thu, 4 May 2023 13:58:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D6043858D33 Received: from DB6PR0301CA0012.eurprd03.prod.outlook.com (2603:10a6:4:3e::22) by AS8PR08MB9953.eurprd08.prod.outlook.com (2603:10a6:20b:635::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.26; Thu, 4 May 2023 13:58:43 +0000 Received: from DBAEUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3e:cafe::75) by DB6PR0301CA0012.outlook.office365.com (2603:10a6:4:3e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.22 via Frontend Transport; Thu, 4 May 2023 13:58:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT005.mail.protection.outlook.com (100.127.142.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.26 via Frontend Transport; Thu, 4 May 2023 13:58:43 +0000 Received: ("Tessian outbound 5154e9d36775:v136"); Thu, 04 May 2023 13:58:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cd745b9cc3251ee5 X-CR-MTA-TID: 64aa7808 Received: from 9c8e88a9ea6b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F5982764-1709-4254-ABA9-BBCCA50BC696.1; Thu, 04 May 2023 13:58:36 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9c8e88a9ea6b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 04 May 2023 13:58:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JydPG48n6Grk2zmH1xnk/btmvkPeQ05CzsBoEh2MsOx93ctF3MfOqn86YMktf7buHgZbow2hh4+J80qTQDid9ssxAqjcawyU82T59eMNu7AyEoHwwWV6CnJsaBKuDDnTnpnhjnIBGaYTmlBx8Ci0Ywg/iGpW0wJwRBUkLKbfs2Okx/BoNNPlE3C5VRu9FaG3i5rtMZHgOi/FrmFmsmz+ccxhJ/ipzI+FT11/2AF1wmEtPwcfr69fC0+ZqtR3fohQTnZd0w7q8NMcTFuc6FGiDx1/B2GZi4L4zDLS45EHDr585p8xie1F6RLqj83bwaeJ0U7zl36+RNPqifBAER4MBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KcThXS+QcuZMxbKMlTvKIa/uGwyk3cdhV51TOKquwTo=; b=W43x9bA/BxMmpFt2D9WfseROKcLVbyC9j7oT0wdO1CVjQH+/pjicz6F2PW6yi49SayOGC5n4oRRK7LNg9teeruByJNBkzzAoE9aTLEWB1ccupyQafUwEAvbNLixxIGEwz/jvMKoLshIG5AV84FfBW8AxYkW86UZuz0MGUHXSK1/iSjJJDwzroIVmrp4nJloMbUE0vaD7NQGsJ8VWpfAgDtEUaKg1CTakuDfKntjpgYSEBkTG23phYgBvLBrPeZ1cVhs47NqZSsVLWBtFDUCFVUTUHMRsBEC/Zjddp5WBS/a/PUVs8R/OL/JRTV5DitnBCUMs6aSxFbmWaT9pWJ+5kA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB8PR06CA0023.eurprd06.prod.outlook.com (2603:10a6:10:100::36) by GV1PR08MB8714.eurprd08.prod.outlook.com (2603:10a6:150:83::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.21; Thu, 4 May 2023 13:58:32 +0000 Received: from DBAEUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:100:cafe::fd) by DB8PR06CA0023.outlook.office365.com (2603:10a6:10:100::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.26 via Frontend Transport; Thu, 4 May 2023 13:58:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT035.mail.protection.outlook.com (100.127.142.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6363.26 via Frontend Transport; Thu, 4 May 2023 13:58:31 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 4 May 2023 13:58:31 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Thu, 4 May 2023 13:58:31 +0000 To: Subject: [PATCH] aarch64: SVE ACLE configure test cleanups Date: Thu, 4 May 2023 14:58:31 +0100 Message-ID: <20230504135831.545264-1-szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT035:EE_|GV1PR08MB8714:EE_|DBAEUR03FT005:EE_|AS8PR08MB9953:EE_ X-MS-Office365-Filtering-Correlation-Id: 0382022f-d263-4281-cb9f-08db4ca7ac4b x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: IL/AAMxJtJ0eYPaBjoCUNkDKUwmUBeQW3/9OPrkxjNovINN41kCJGsDQmBPvqhKe0J6K0QY0ZmwoBYl/htp6R0ggd35r/YBM/Mkgp5A0EExcLJuHVMHibU5vkTpNUBTairb0girATC8E1Yd4Dfc6FYHwvkGtp10AM1G2vpkCPYXpVa0YjJFQL+7CkZGBcmwPqhy8uhla7F4Y82rIQupHWis4gC7ssNcms7dzsgt86nVkFzngKDE6Fs0ipFlsRIhFVeriVV9KOnUohtabDn6jDzzT/AE6aOijixICRsX5oFPd+wqDMaxRENoeabCqWLctzaG83zWpXgCR3fDB8NCZl/pVhlYoLBpmbZGtRsK0SC2WAPquZS1t5M74M8ohw0kicFwiorbksmzPNRZrMg4ETmaBnFFa+k6uOQQl5SXiVU5BQ4f1LSaS40vi593A40SKMYytOB2s0jT8Aqh4A3wrmAd/JOMaFgfvkOzYFUerD7yQn1SvI5HRH5qr5MwJbyMiWBJqD98SyrckFikmB+0kFU3jHOABc6UnhPJquu55N7Ijiv6ylXzwqZPhX8v41BnQqcx2axRWDRVpdYUASa6zLnnAe/0ze1TbtiDBcrulLLZ2a242/1+1LAhID5nQVw4ibfKx6YNnJj4YO35wzLeikqkLIMWigZy9V2+QBO+1VFUrfjNOmwyf7bAApH7Yp64GIaaC04ynokzrINRw8cohdZUZWgldUsQDqw1MUmS5oTFP0pc6dEJezdiliB2X/tpzas7oY1IVljwsF/hLOEhD5g== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(396003)(376002)(346002)(136003)(39860400002)(451199021)(40470700004)(46966006)(36840700001)(36860700001)(36756003)(81166007)(5660300002)(40480700001)(2906002)(40460700003)(336012)(8676002)(86362001)(316002)(70586007)(82310400005)(356005)(82740400003)(70206006)(44832011)(8936002)(83380400001)(426003)(34020700004)(2616005)(186003)(47076005)(26005)(7696005)(478600001)(1076003)(6916009)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8714 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c69e7268-c3fc-44fc-9b32-08db4ca7a550 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kdo0dQxJ+L27GY0hBrV9u1SKaLD0MqILbFeC/lgMa4Di1qjb1n0R4zUwcKJWjug2IoOR2Jv4X/j3sOdFVvqSLVdSJA8Bzqb24Ohtz38kd9iMY8HUrBu55SoQK5wosYQIVgDu2W8NSduncncoMp60b+2BDWigI+iBhb27XmMUfj8cGExwsv5envWeJTZWAM2akUH+oUrbMsG2FokXl4Sa5HzIaPcKYtakao0xKQSP9TtvAz1V7Pk0yWIymrUPkGCLIs74BG4JEMtkKk7Kd9ep6JQ9kJ3kHX7M/KGeUI0/WwT96ETZJUFCB75sMvddqWsPY5ox25osDAy6Ga6Qjw7KNSec7Ca+Ic3mD4+Gkpbs30TQRkvlVxu4AMPZYgbLCGnCn0FZJ2FsGP151dFblbDSvYwAIPgvPtN+qT/Ewyp22zGGEkmmQrziDcN/oAlXfD81Gx7MP47UJqVJbnzqDluqoOrHasy9waZqowUTBG8HBk+eHCCCEb2zp3jkZUa8oW/hKGG5z07vQxLzZkPakrv/kIvCi3ILuIAqRlogv2MwJhm8tljUKCspw6IkiR44ttQ71G29PGNkB+Cp9GUbX1JWEU/VS5yq3Wr9KZW/LvqAR8Ah5IvRNFD769aVq0cuctrscRQb4Uaag4aSogZY6j8NY/ng/rUOhTC0Df5oJXI5U5KAkJNS3czjs6O538ZXRP1uNp/uVg5zfDt7UyT3V1aBdhMQ/o7n0kggzQlg5+jNUGo= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(39860400002)(376002)(346002)(451199021)(40470700004)(36840700001)(46966006)(82310400005)(83380400001)(426003)(336012)(82740400003)(2906002)(478600001)(40480700001)(34020700004)(5660300002)(316002)(8676002)(8936002)(41300700001)(44832011)(70206006)(70586007)(81166007)(6916009)(86362001)(7696005)(47076005)(36756003)(36860700001)(40460700003)(186003)(1076003)(26005)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2023 13:58:43.6955 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0382022f-d263-4281-cb9f-08db4ca7ac4b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9953 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Use more idiomatic configure test for better autoconf cache and logs. --- sysdeps/aarch64/configure | 24 ++++++++++++++++-------- sysdeps/aarch64/configure.ac | 19 +++++++++++-------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure index d0d78d69f1..030996c55a 100644 --- a/sysdeps/aarch64/configure +++ b/sysdeps/aarch64/configure @@ -335,18 +335,26 @@ fi # Check if compiler is sufficient to build mathvec (needs SVE ACLE) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of SVE ACLE" >&5 $as_echo_n "checking for availability of SVE ACLE... " >&6; } -if ${libc_cv_has_sve_acle+:} false; then : +if ${libc_cv_aarch64_sve_acle+:} false; then : $as_echo_n "(cached) " >&6 else - if test $build_mathvec = yes; then cat > conftest.c < EOF - if ! ${CC-cc} conftest.c -fsyntax-only -ffreestanding; then - as_fn_error 1 "mathvec is enabled but compiler does not have SVE ACLE. Either use a compatible compiler or configure with --disable-mathvec (this results in incomplete ABI)." - fi - rm conftest.c + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fsyntax-only -ffreestanding conftest.c' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_aarch64_sve_acle=yes + else + libc_cv_aarch64_sve_acle=no fi + rm conftest.c +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_sve_acle" >&5 +$as_echo "$libc_cv_aarch64_sve_acle" >&6; } +if test $build_mathvec = yes && test $libc_cv_aarch64_sve_acle = no; then + as_fn_error $? "mathvec is enabled but compiler does not have SVE ACLE. Either use a compatible compiler or configure with --disable-mathvec (this results in incomplete ABI)." "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_has_sve_acle" >&5 -$as_echo "$libc_cv_has_sve_acle" >&6; } diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac index 259edc3de8..76f78fcba9 100644 --- a/sysdeps/aarch64/configure.ac +++ b/sysdeps/aarch64/configure.ac @@ -107,13 +107,16 @@ if test x"$build_mathvec" = xnotset; then fi # Check if compiler is sufficient to build mathvec (needs SVE ACLE) -AC_CACHE_CHECK(for availability of SVE ACLE, libc_cv_has_sve_acle, [dnl - if test $build_mathvec = yes; then - cat > conftest.c < conftest.c < EOF - if ! ${CC-cc} conftest.c -fsyntax-only -ffreestanding; then - as_fn_error 1 "mathvec is enabled but compiler does not have SVE ACLE. Either use a compatible compiler or configure with --disable-mathvec (this results in incomplete ABI)." - fi - rm conftest.c - fi]) + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fsyntax-only -ffreestanding conftest.c]); then + libc_cv_aarch64_sve_acle=yes + else + libc_cv_aarch64_sve_acle=no + fi + rm conftest.c]) +if test $build_mathvec = yes && test $libc_cv_aarch64_sve_acle = no; then + AC_MSG_ERROR([mathvec is enabled but compiler does not have SVE ACLE. Either use a compatible compiler or configure with --disable-mathvec (this results in incomplete ABI).]) +fi